Skip to content

Commit

Permalink
Synchronize the main and full workflows (cvat-ai#5875)
Browse files Browse the repository at this point in the history
The full workflow is broken, because some changes from the main workflow
weren't applied to it. Update them both to minimize differences between
them.
  • Loading branch information
SpecLad authored Mar 17, 2023
1 parent 2cbf951 commit cb72be0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 28 deletions.
37 changes: 13 additions & 24 deletions .github/workflows/full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
env:
WORKFLOW_RUN_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
CYPRESS_VERIFY_TIMEOUT: 180000 # https://docs.cypress.io/guides/guides/command-line#cypress-verify
CVAT_VERSION: "local"

jobs:
search_cache:
Expand Down Expand Up @@ -41,10 +42,6 @@ jobs:

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
# we specify version of buildkit due to issue that occurs in latest version
# https://github.com/moby/buildkit/issues/2631
driver-opts: image=moby/buildkit:v0.10.0

- name: Create artifact directories
run: |
Expand Down Expand Up @@ -95,7 +92,7 @@ jobs:
name: cvat_sdk
path: /tmp/cvat_sdk/

rest_api:
rest_api_testing:
needs: build
runs-on: ubuntu-latest
steps:
Expand All @@ -107,9 +104,6 @@ jobs:
with:
python-version: '3.8'

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@master

- name: Download CVAT server image
uses: actions/download-artifact@v3
with:
Expand All @@ -132,8 +126,8 @@ jobs:
run: |
docker load --input /tmp/cvat_server/image.tar
docker load --input /tmp/cvat_ui/image.tar
docker tag cvat/server:latest cvat/server:dev
docker tag cvat/ui:latest cvat/ui:dev
docker tag cvat/server:latest cvat/server:${CVAT_VERSION}
docker tag cvat/ui:latest cvat/ui:${CVAT_VERSION}
docker image ls -a
- name: Verify API schema
Expand Down Expand Up @@ -164,12 +158,12 @@ jobs:
pip3 install --user '/tmp/cvat_sdk/[pytorch]'
pip3 install --user cvat-cli/
pip3 install --user -r tests/python/requirements.txt
pytest tests/python -s -v
pytest tests/python/ -s -v
- name: Creating a log file from cvat containers
if: failure() && steps.run_tests.conclusion == 'failure'
env:
LOGS_DIR: "${{ github.workspace }}/rest_api"
LOGS_DIR: "${{ github.workspace }}/rest_api_testing"
run: |
mkdir $LOGS_DIR
docker logs test_cvat_server_1 > $LOGS_DIR/cvat_server.log
Expand All @@ -182,7 +176,7 @@ jobs:
uses: actions/[email protected]
with:
name: rest_api_container_logs
path: "${{ github.workspace }}/rest_api"
path: "${{ github.workspace }}/rest_api_testing"

unit_testing:
needs: build
Expand All @@ -192,19 +186,16 @@ jobs:
with:
ref: ${{ inputs.ref }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@master

- name: Download CVAT server image
uses: actions/download-artifact@v3
with:
name: cvat_server
path: /tmp/cvat_server/

- name: Load Docker images
- name: Load Docker server image
run: |
docker load --input /tmp/cvat_server/image.tar
docker tag cvat/server:latest cvat/server:dev
docker tag cvat/server:latest cvat/server:${CVAT_VERSION}
docker image ls -a
- name: Running OPA tests
Expand All @@ -222,6 +213,7 @@ jobs:
CONTAINER_COVERAGE_DATA_DIR: "/coverage_data"
run: |
docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d cvat_opa cvat_server
max_tries=12
while [[ $(curl -s -o /dev/null -w "%{http_code}" localhost:8181/health?bundles) != "200" && max_tries -gt 0 ]]; do (( max_tries-- )); sleep 5; done
Expand Down Expand Up @@ -266,9 +258,6 @@ jobs:
with:
node-version: '16.x'

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@master

- name: Download CVAT server image
uses: actions/download-artifact@v3
with:
Expand All @@ -285,8 +274,8 @@ jobs:
run: |
docker load --input /tmp/cvat_server/image.tar
docker load --input /tmp/cvat_ui/image.tar
docker tag cvat/server:latest cvat/server:dev
docker tag cvat/ui:latest cvat/ui:dev
docker tag cvat/server:latest cvat/server:${CVAT_VERSION}
docker tag cvat/ui:latest cvat/ui:${CVAT_VERSION}
docker image ls -a
- name: Run CVAT instance
Expand All @@ -308,6 +297,7 @@ jobs:
do
echo Number of attempts left: $max_tries
echo Status code of response: $status_code
sleep 5
status_code=$(curl -s -o /tmp/server_response -w "%{http_code}" ${API_ABOUT_PAGE})
(( max_tries-- ))
Expand All @@ -323,7 +313,6 @@ jobs:
cd ./tests
yarn --frozen-lockfile
shopt -s extglob
if [[ ${{ matrix.specs }} == canvas3d_* ]]; then
npx cypress run \
--headed \
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,10 @@ jobs:
while [[ $(curl -s -o /dev/null -w "%{http_code}" localhost:8181/health?bundles) != "200" && max_tries -gt 0 ]]; do (( max_tries-- )); sleep 5; done
docker compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash \
-c 'python manage.py test cvat/apps -v 2'
-c 'python manage.py test cvat/apps -v 2'
docker compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash \
-c 'yarn --frozen-lockfile --ignore-scripts && yarn workspace cvat-core run test'
-c 'yarn --frozen-lockfile --ignore-scripts && yarn workspace cvat-core run test'
- name: Creating a log file from cvat containers
if: failure()
Expand All @@ -235,7 +235,6 @@ jobs:
name: unit_tests_container_logs
path: "${{ github.workspace }}/unit_testing"


e2e_testing:
needs: build
runs-on: ubuntu-latest
Expand All @@ -253,7 +252,7 @@ jobs:
with:
node-version: '16.x'

- name: Download CVAT server images
- name: Download CVAT server image
uses: actions/download-artifact@v3
with:
name: cvat_server
Expand Down Expand Up @@ -281,6 +280,7 @@ jobs:
-f components/serverless/docker-compose.serverless.yml \
-f tests/docker-compose.minio.yml \
-f tests/docker-compose.file_share.yml up -d
- name: Waiting for server
env:
API_ABOUT_PAGE: "localhost:8080/api/server/about"
Expand Down

0 comments on commit cb72be0

Please sign in to comment.