mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-11-25 14:51:26 +00:00
test: fix ci (#6657)
This commit is contained in:
parent
557ce7e006
commit
cee0e2ed42
37
.github/workflows/flutter_ci.yaml
vendored
37
.github/workflows/flutter_ci.yaml
vendored
@ -40,7 +40,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest]
|
os: [ ubuntu-latest ]
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
flutter_profile: development-linux-x86_64
|
flutter_profile: development-linux-x86_64
|
||||||
@ -74,7 +74,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
os: [windows-latest]
|
os: [ windows-latest ]
|
||||||
include:
|
include:
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
flutter_profile: development-windows-x86
|
flutter_profile: development-windows-x86
|
||||||
@ -101,7 +101,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest]
|
os: [ macos-latest ]
|
||||||
include:
|
include:
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
flutter_profile: development-mac-x86_64
|
flutter_profile: development-mac-x86_64
|
||||||
@ -123,12 +123,12 @@ jobs:
|
|||||||
flutter_profile: ${{ matrix.flutter_profile }}
|
flutter_profile: ${{ matrix.flutter_profile }}
|
||||||
|
|
||||||
unit_test:
|
unit_test:
|
||||||
needs: [prepare-linux]
|
needs: [ prepare-linux ]
|
||||||
if: github.event.pull_request.draft != true
|
if: github.event.pull_request.draft != true
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest]
|
os: [ ubuntu-latest ]
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
flutter_profile: development-linux-x86_64
|
flutter_profile: development-linux-x86_64
|
||||||
@ -217,11 +217,11 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
cloud_integration_test:
|
cloud_integration_test:
|
||||||
needs: [prepare-linux]
|
needs: [ prepare-linux ]
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest]
|
os: [ ubuntu-latest ]
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
flutter_profile: development-linux-x86_64
|
flutter_profile: development-linux-x86_64
|
||||||
@ -262,9 +262,20 @@ jobs:
|
|||||||
else
|
else
|
||||||
running_image=$(docker inspect --format='{{index .Config.Image}}' "$container_id")
|
running_image=$(docker inspect --format='{{index .Config.Image}}' "$container_id")
|
||||||
if [ "$running_image" != "appflowy-cloud:$APPFLOWY_CLOUD_VERSION" ]; then
|
if [ "$running_image" != "appflowy-cloud:$APPFLOWY_CLOUD_VERSION" ]; then
|
||||||
echo "AppFlowy-Cloud is running with an incorrect version. Pulling the correct version..."
|
echo "AppFlowy-Cloud is running with an incorrect version. Restarting with the correct version..."
|
||||||
docker rm -f $(docker ps -aq)
|
# Remove all containers if any exist
|
||||||
docker volume rm $(docker volume ls -q)
|
if [ "$(docker ps -aq)" ]; then
|
||||||
|
docker rm -f $(docker ps -aq)
|
||||||
|
else
|
||||||
|
echo "No containers to remove."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove all volumes if any exist
|
||||||
|
if [ "$(docker volume ls -q)" ]; then
|
||||||
|
docker volume rm $(docker volume ls -q)
|
||||||
|
else
|
||||||
|
echo "No volumes to remove."
|
||||||
|
fi
|
||||||
docker compose pull
|
docker compose pull
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
echo "Waiting for the container to be ready..."
|
echo "Waiting for the container to be ready..."
|
||||||
@ -329,13 +340,13 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
integration_test:
|
integration_test:
|
||||||
needs: [prepare-linux]
|
needs: [ prepare-linux ]
|
||||||
if: github.event.pull_request.draft != true
|
if: github.event.pull_request.draft != true
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest]
|
os: [ ubuntu-latest ]
|
||||||
test_number: [1, 2, 3, 4, 5, 6, 7, 8]
|
test_number: [ 1, 2, 3, 4, 5, 6, 7, 8 ]
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
target: "x86_64-unknown-linux-gnu"
|
target: "x86_64-unknown-linux-gnu"
|
||||||
|
|||||||
20
.github/workflows/rust_ci.yaml
vendored
20
.github/workflows/rust_ci.yaml
vendored
@ -25,7 +25,7 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
self-hosted-job:
|
self-hosted-job:
|
||||||
if: github.event.pull_request.head.repo.full_name == github.repository
|
if: github.event.pull_request.head.repo.full_name != github.repository
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source code
|
- name: Checkout source code
|
||||||
@ -62,8 +62,6 @@ jobs:
|
|||||||
running_image=$(docker inspect --format='{{index .Config.Image}}' "$container_id")
|
running_image=$(docker inspect --format='{{index .Config.Image}}' "$container_id")
|
||||||
if [ "$running_image" != "appflowy-cloud:$APPFLOWY_CLOUD_VERSION" ]; then
|
if [ "$running_image" != "appflowy-cloud:$APPFLOWY_CLOUD_VERSION" ]; then
|
||||||
echo "AppFlowy-Cloud is running with an incorrect version. Pulling the correct version..."
|
echo "AppFlowy-Cloud is running with an incorrect version. Pulling the correct version..."
|
||||||
docker rm -f $(docker ps -aq)
|
|
||||||
docker volume rm $(docker volume ls -q)
|
|
||||||
docker compose pull
|
docker compose pull
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
echo "Waiting for the container to be ready..."
|
echo "Waiting for the container to be ready..."
|
||||||
@ -149,8 +147,20 @@ jobs:
|
|||||||
APPFLOWY_HISTORY_VERSION: ${{ env.CLOUD_VERSION }}
|
APPFLOWY_HISTORY_VERSION: ${{ env.CLOUD_VERSION }}
|
||||||
APPFLOWY_WORKER_VERSION: ${{ env.CLOUD_VERSION }}
|
APPFLOWY_WORKER_VERSION: ${{ env.CLOUD_VERSION }}
|
||||||
run: |
|
run: |
|
||||||
docker rm -f $(docker ps -aq)
|
# Remove all containers if any exist
|
||||||
docker volume rm $(docker volume ls -q)
|
if [ "$(docker ps -aq)" ]; then
|
||||||
|
docker rm -f $(docker ps -aq)
|
||||||
|
else
|
||||||
|
echo "No containers to remove."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove all volumes if any exist
|
||||||
|
if [ "$(docker volume ls -q)" ]; then
|
||||||
|
docker volume rm $(docker volume ls -q)
|
||||||
|
else
|
||||||
|
echo "No volumes to remove."
|
||||||
|
fi
|
||||||
|
|
||||||
docker compose pull
|
docker compose pull
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
echo "Waiting for the container to be ready..."
|
echo "Waiting for the container to be ready..."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user