forked from cvat-ai/cvat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
756 changed files
with
24,618 additions
and
12,200 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 |
---|---|---|
|
@@ -8,3 +8,4 @@ keys/ | |
logs/ | ||
static/ | ||
templates/ | ||
*/webpack.config.js |
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,43 @@ | ||
name: Github pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
|
||
- name: Setup Hugo | ||
uses: peaceiris/actions-hugo@v2 | ||
with: | ||
hugo-version: '0.83.1' | ||
extended: true | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14.x' | ||
|
||
- name: Install npm packages | ||
working-directory: ./site | ||
run: | | ||
npm ci | ||
- name: Build docs | ||
run: | | ||
pip install gitpython packaging | ||
python site/build_docs.py | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./public | ||
force_orphan: true |
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 |
---|---|---|
|
@@ -59,7 +59,7 @@ jobs: | |
cache-from: type=local,src=/tmp/cvat_cache_server | ||
tags: openvino/cvat_server:latest | ||
load: true | ||
- name: Runing unit tests | ||
- name: Running unit tests | ||
env: | ||
HOST_COVERAGE_DATA_DIR: ${{ github.workspace }} | ||
CONTAINER_COVERAGE_DATA_DIR: "/coverage_data" | ||
|
@@ -80,7 +80,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
specs: ['actions_tasks', 'actions_tasks2', 'actions_tasks3', 'actions_objects', 'actions_objects2', 'actions_users', 'actions_projects', 'canvas3d_functionality', 'issues_prs', 'issues_prs2'] | ||
specs: ['actions_tasks', 'actions_tasks2', 'actions_tasks3', 'actions_objects', 'actions_objects2', 'actions_users', 'actions_projects_models', 'canvas3d_functionality', 'canvas3d_functionality_2', 'issues_prs', 'issues_prs2'] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Getting SHA from the default branch | ||
|
@@ -151,24 +151,32 @@ jobs: | |
run: | | ||
npm ci | ||
npm run coverage | ||
docker-compose -f docker-compose.yml -f docker-compose.dev.yml build cvat_ui | ||
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f components/serverless/docker-compose.serverless.yml build cvat_ui | ||
- name: Running e2e tests | ||
env: | ||
DJANGO_SU_NAME: 'admin' | ||
DJANGO_SU_EMAIL: '[email protected]' | ||
DJANGO_SU_PASSWORD: '12qwaszx' | ||
API_ABOUT_PAGE: "localhost:8080/api/v1/server/about" | ||
run: | | ||
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d | ||
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f components/serverless/docker-compose.serverless.yml up -d | ||
/bin/bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' ${API_ABOUT_PAGE})" != "401" ]]; do sleep 5; done' | ||
docker exec -i cvat /bin/bash -c "echo \"from django.contrib.auth.models import User; User.objects.create_superuser('${DJANGO_SU_NAME}', '${DJANGO_SU_EMAIL}', '${DJANGO_SU_PASSWORD}')\" | python3 ~/manage.py shell" docker exec -i cvat /bin/bash -c "echo \"from django.contrib.auth.models import User; User.objects.create_superuser('${DJANGO_SU_NAME}', '${DJANGO_SU_EMAIL}', '${DJANGO_SU_PASSWORD}')\" | python3 ~/manage.py shell" | ||
cd ./tests | ||
npm ci | ||
if [[ ${{ github.ref }} == 'refs/heads/develop' ]]; then | ||
npx cypress run --headless --browser chrome --spec 'cypress/integration/${{ matrix.specs }}/**/*.js' | ||
if [ ${{ matrix.specs }} == 'canvas3d_functionality' ] || [ ${{ matrix.specs }} == 'canvas3d_functionality_2' ]; then | ||
npx cypress run --browser chrome --config-file cypress_canvas3d.json --spec 'cypress/integration/${{ matrix.specs }}/**/*.js' | ||
else | ||
npx cypress run --headless --browser chrome --spec 'cypress/integration/${{ matrix.specs }}/**/*.js' | ||
fi | ||
mv ./.nyc_output/out.json ./.nyc_output/out_${{ matrix.specs }}.json | ||
else | ||
npx cypress run --headless --browser chrome --env coverage=false --spec 'cypress/integration/${{ matrix.specs }}/**/*.js' | ||
if [ ${{ matrix.specs }} == 'canvas3d_functionality' ] || [ ${{ matrix.specs }} == 'canvas3d_functionality_2' ]; then | ||
npx cypress run --browser chrome --env coverage=false --config-file cypress_canvas3d.json --spec 'cypress/integration/${{ matrix.specs }}/**/*.js' | ||
else | ||
npx cypress run --headless --browser chrome --env coverage=false --spec 'cypress/integration/${{ matrix.specs }}/**/*.js' | ||
fi | ||
fi | ||
- name: Creating a log file from "cvat" container logs | ||
if: failure() | ||
|
@@ -199,7 +207,7 @@ jobs: | |
needs: [Unit_testing, E2E_testing] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Geting SHA from the default branch | ||
- name: Getting SHA from the default branch | ||
id: get-sha | ||
run: | | ||
URL_get_default_branch="https://api.github.com/repos/${{ github.repository }}" | ||
|
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 |
---|---|---|
|
@@ -4,43 +4,55 @@ on: | |
types: [published] | ||
|
||
jobs: | ||
build_and_push_to_registry: | ||
Unit_testing: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 12 | ||
|
||
- name: Build images | ||
run: | | ||
CLAM_AV=yes INSTALL_SOURCES=yes docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml build | ||
- name: Run unit tests | ||
env: | ||
HOST_COVERAGE_DATA_DIR: ${{ github.workspace }} | ||
CONTAINER_COVERAGE_DATA_DIR: '/coverage_data' | ||
DJANGO_SU_NAME: 'admin' | ||
DJANGO_SU_EMAIL: '[email protected]' | ||
DJANGO_SU_PASSWORD: '12qwaszx' | ||
run: | | ||
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash -c 'coverage run -a manage.py test cvat/apps utils/cli' | ||
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash -c 'cd cvat-data && npm ci && cd ../cvat-core && npm ci && npm run test' | ||
docker-compose up -d | ||
docker exec -i cvat /bin/bash -c "echo \"from django.contrib.auth.models import User; User.objects.create_superuser('${DJANGO_SU_NAME}', '${DJANGO_SU_EMAIL}', '${DJANGO_SU_PASSWORD}')\" | python3 ~/manage.py shell" | ||
E2E_testing: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 12 | ||
- name: Run end-to-end tests | ||
env: | ||
DJANGO_SU_NAME: 'admin' | ||
DJANGO_SU_EMAIL: '[email protected]' | ||
DJANGO_SU_PASSWORD: '12qwaszx' | ||
API_ABOUT_PAGE: "localhost:8080/api/v1/server/about" | ||
run: | | ||
docker-compose -f docker-compose.yml -f docker-compose.dev.yml build | ||
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f components/serverless/docker-compose.serverless.yml up -d | ||
/bin/bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' ${API_ABOUT_PAGE})" != "401" ]]; do sleep 5; done' | ||
docker exec -i cvat /bin/bash -c "echo \"from django.contrib.auth.models import User; User.objects.create_superuser('${DJANGO_SU_NAME}', '${DJANGO_SU_EMAIL}', '${DJANGO_SU_PASSWORD}')\" | python3 ~/manage.py shell" | ||
cd ./tests | ||
npm ci | ||
npm run cypress:run:chrome | ||
npm run cypress:run:chrome:canvas3d | ||
- name: Uploading cypress screenshots as an artifact | ||
if: failure() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: cypress_screenshots | ||
path: ${{ github.workspace }}/tests/cypress/screenshots | ||
|
||
Push_to_registry: | ||
runs-on: ubuntu-latest | ||
needs: [Unit_testing, E2E_testing] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build images | ||
run: | | ||
CLAM_AV=yes INSTALL_SOURCES=yes docker-compose -f docker-compose.yml -f docker-compose.dev.yml build | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
|
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 |
---|---|---|
|
@@ -11,31 +11,16 @@ jobs: | |
|
||
- name: Run checks | ||
run: | | ||
URL="https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | ||
PR_FILES=$(curl -s -X GET -G $URL | jq -r '.[] | select(.status != "removed") | .filename') | ||
for files in $PR_FILES; do | ||
extension="${files##*.}" | ||
if [[ $extension == 'md' ]]; then | ||
changed_files_remark+=" ${files}" | ||
fi | ||
done | ||
npm ci | ||
mkdir -p remark_report | ||
if [[ ! -z ${changed_files_remark} ]]; then | ||
npm ci | ||
npm install [email protected] [email protected] | ||
mkdir -p remark_report | ||
echo "Remark version: "`npx remark --version` | ||
echo "The files will be checked: "`echo ${changed_files_remark}` | ||
npx remark --quiet --report json --no-stdout ${changed_files_remark} 2> ./remark_report/remark_report.json | ||
get_report=`cat ./remark_report/remark_report.json | jq -r '.[] | select(.messages | length > 0)'` | ||
if [[ ! -z ${get_report} ]]; then | ||
pip install json2html | ||
python ./tests/json_to_html.py ./remark_report/remark_report.json | ||
exit 1 | ||
fi | ||
else | ||
echo "No files with the \"md\" extension found" | ||
echo "Remark version: "`npx remark --version` | ||
npx remark --quiet --report json --no-stdout . 2> ./remark_report/remark_report.json | ||
get_report=`cat ./remark_report/remark_report.json | jq -r '.[] | select(.messages | length > 0)'` | ||
if [[ ! -z ${get_report} ]]; then | ||
pip install json2html | ||
python ./tests/json_to_html.py ./remark_report/remark_report.json | ||
exit 1 | ||
fi | ||
- name: Upload artifacts | ||
|
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
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,3 @@ | ||
[submodule "site/themes/docsy"] | ||
path = site/themes/docsy | ||
url = https://github.com/google/docsy |
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
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
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
Oops, something went wrong.