-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into zm/honey-pot-server
- Loading branch information
Showing
29 changed files
with
327 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
[run] | ||
branch = true | ||
# relative_files = true # does not work? | ||
|
||
source = | ||
cvat/apps/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
comment: | ||
layout: "header, diff, components" | ||
|
||
component_management: | ||
individual_components: | ||
- component_id: cvat-ui | ||
name: cvat-ui | ||
paths: | ||
- cvat-canvas/** | ||
- cvat-canvas3d/** | ||
- cvat-core/** | ||
- cvat-data/** | ||
- cvat-ui/** | ||
- component_id: cvat-server | ||
name: cvat-server | ||
paths: | ||
- cvat/** | ||
- cvat-cli/** | ||
- cvat-sdk/** | ||
- utils/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ jobs: | |
- uses: actions/checkout@v3 | ||
|
||
- name: Start minikube | ||
uses: medyagh/setup-minikube@master | ||
uses: medyagh/setup-minikube@latest | ||
with: | ||
cpus: max | ||
memory: max | ||
|
@@ -44,7 +44,7 @@ jobs: | |
|
||
- name: Deploy to minikube | ||
run: | | ||
printf "traefik:\n service:\n externalIPs:\n - $(minikube ip)\n" >> tests/values.test.yaml | ||
printf " service:\n externalIPs:\n - $(minikube ip)\n" >> tests/values.test.yaml | ||
cd helm-chart | ||
helm dependency update | ||
cd .. | ||
|
@@ -83,3 +83,22 @@ jobs: | |
run: | | ||
kubectl cp tests/mounted_file_share/images $(kubectl get pods -l component=server -o jsonpath='{.items[0].metadata.name}'):/home/django/share | ||
pytest --timeout 30 --platform=kube -m "not with_external_services" tests/python --log-cli-level DEBUG | ||
- name: Creating a log file from "cvat" container logs | ||
if: failure() | ||
env: | ||
LOGS_DIR: "${{ github.workspace }}/rest_api_testing" | ||
run: | | ||
mkdir ${LOGS_DIR} | ||
kubectl logs $(kubectl get pods -l component=server -o 'jsonpath={.items[0].metadata.name}') >${LOGS_DIR}/cvat_server.log | ||
kubectl logs $(kubectl get pods -l component=worker-import -o 'jsonpath={.items[0].metadata.name}') >${LOGS_DIR}/cvat_worker_import.log | ||
kubectl logs $(kubectl get pods -l component=worker-export -o 'jsonpath={.items[0].metadata.name}') >${LOGS_DIR}/cvat_worker_export.log | ||
kubectl logs $(kubectl get pods -l component=worker-webhooks -o 'jsonpath={.items[0].metadata.name}') >${LOGS_DIR}/cvat_worker_webhooks.log | ||
kubectl logs $(kubectl get pods -l app.kubernetes.io/name=traefik -o 'jsonpath={.items[0].metadata.name}') >${LOGS_DIR}/traefik.log | ||
- name: Uploading "cvat" container logs as an artifact | ||
if: failure() | ||
uses: actions/[email protected] | ||
with: | ||
name: rest_api_container_logs | ||
path: "${{ github.workspace }}/rest_api_testing" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,12 +52,19 @@ jobs: | |
- name: CVAT server. Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
build-args: | | ||
"COVERAGE_PROCESS_START=.coveragerc" | ||
cache-from: type=local,src=/tmp/cvat_cache_server | ||
context: . | ||
file: Dockerfile | ||
tags: cvat/server | ||
outputs: type=docker,dest=/tmp/cvat_server/image.tar | ||
|
||
- name: Instrumentation of the code then rebuilding the CVAT UI | ||
run: | | ||
yarn --frozen-lockfile | ||
yarn run coverage | ||
- name: CVAT UI. Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
|
@@ -130,12 +137,6 @@ jobs: | |
name: cvat_ui | ||
path: /tmp/cvat_ui/ | ||
|
||
- name: Download CVAT SDK package | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: cvat_sdk | ||
path: /tmp/cvat_sdk/ | ||
|
||
- name: Load Docker images | ||
run: | | ||
docker load --input /tmp/cvat_server/image.tar | ||
|
@@ -144,7 +145,6 @@ jobs: | |
docker tag cvat/ui:latest cvat/ui:${CVAT_VERSION} | ||
docker image ls -a | ||
- name: Upload expected schema as an artifact | ||
if: failure() && steps.verify_schema.conclusion == 'failure' | ||
uses: actions/[email protected] | ||
|
@@ -154,11 +154,20 @@ jobs: | |
|
||
- name: Running REST API and SDK tests | ||
id: run_tests | ||
env: | ||
COVERAGE_PROCESS_START: ".coveragerc" | ||
run: | | ||
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 | ||
pip3 install -r cvat-sdk/gen/requirements.txt | ||
./cvat-sdk/gen/generate.sh | ||
pip3 install -r ./tests/python/requirements.txt | ||
pip3 install -e ./cvat-sdk | ||
pip3 install -e ./cvat-cli | ||
pytest tests/python/ --cov --cov-report xml | ||
- name: Upload coverage reports to Codecov with GitHub Action | ||
uses: codecov/codecov-action@v3 | ||
|
||
- name: Creating a log file from cvat containers | ||
if: failure() && steps.run_tests.conclusion == 'failure' | ||
|
@@ -216,10 +225,13 @@ 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 'coverage run -a manage.py test cvat/apps && coverage json && mv coverage.json ${CONTAINER_COVERAGE_DATA_DIR}' | ||
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 && mv cvat-core/reports/coverage/coverage-final.json ${CONTAINER_COVERAGE_DATA_DIR}' | ||
- name: Upload coverage reports to Codecov with GitHub Action | ||
uses: codecov/codecov-action@v3 | ||
|
||
- name: Creating a log file from cvat containers | ||
if: failure() | ||
|
@@ -313,16 +325,17 @@ jobs: | |
npx cypress run \ | ||
--headed \ | ||
--browser chrome \ | ||
--env coverage=false \ | ||
--config-file cypress_canvas3d.config.js \ | ||
--spec 'cypress/e2e/${{ matrix.specs }}/**/*.js,cypress/e2e/remove_users_tasks_projects_organizations.js' | ||
else | ||
npx cypress run \ | ||
--browser chrome \ | ||
--env coverage=false \ | ||
--spec 'cypress/e2e/${{ matrix.specs }}/**/*.js,cypress/e2e/remove_users_tasks_projects_organizations.js' | ||
fi | ||
- name: Upload coverage reports to Codecov with GitHub Action | ||
uses: codecov/codecov-action@v3 | ||
|
||
- name: Creating a log file from "cvat" container logs | ||
if: failure() | ||
run: | | ||
|
Oops, something went wrong.