-
Notifications
You must be signed in to change notification settings - Fork 3k
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
934 changed files
with
45,255 additions
and
21,369 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
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 was deleted.
Oops, something went wrong.
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,67 @@ | ||
name: Docs | ||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
- 'develop' | ||
pull_request: | ||
types: [ready_for_review, opened, synchronize, reopened] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
generate_github_pages: | ||
permissions: | ||
contents: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
|
||
- name: Generate CVAT SDK | ||
run: | | ||
pip3 install --user -r cvat-sdk/gen/requirements.txt | ||
./cvat-sdk/gen/generate.sh | ||
- name: Setup Hugo | ||
run: | | ||
wget https://github.com/gohugoio/hugo/releases/download/v0.110.0/hugo_extended_0.110.0_Linux-64bit.tar.gz | ||
(mkdir hugo_extended_0.110.0_Linux-64bit && tar -xf hugo_extended_0.110.0_Linux-64bit.tar.gz -C hugo_extended_0.110.0_Linux-64bit) | ||
wget https://github.com/gohugoio/hugo/releases/download/v0.83.0/hugo_extended_0.83.0_Linux-64bit.tar.gz | ||
(mkdir hugo_extended_0.83.0_Linux-64bit && tar -xf hugo_extended_0.83.0_Linux-64bit.tar.gz -C hugo_extended_0.83.0_Linux-64bit) | ||
mkdir hugo | ||
cp hugo_extended_0.110.0_Linux-64bit/hugo hugo/hugo-0.110 | ||
cp hugo_extended_0.83.0_Linux-64bit/hugo hugo/hugo-0.83 | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18.x' | ||
|
||
- name: Install npm packages | ||
working-directory: ./site | ||
run: | | ||
npm ci | ||
- name: Build docs | ||
run: | | ||
pip install -r site/requirements.txt | ||
python site/process_sdk_docs.py | ||
PATH="$PWD/hugo:$PATH" python site/build_docs.py | ||
env: | ||
HUGO_ENV: production | ||
|
||
- name: Deploy | ||
if: github.ref == 'refs/heads/develop' | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./public | ||
force_orphan: true | ||
cname: docs.cvat.ai |
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 |
---|---|---|
|
@@ -75,19 +75,19 @@ jobs: | |
cp -r cvat-sdk/* /tmp/cvat_sdk/ | ||
- name: Upload CVAT server artifact | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: cvat_server | ||
path: /tmp/cvat_server/image.tar | ||
|
||
- name: Upload CVAT UI artifact | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: cvat_ui | ||
path: /tmp/cvat_ui/image.tar | ||
|
||
- name: Upload CVAT SDK artifact | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: cvat_sdk | ||
path: /tmp/cvat_sdk/ | ||
|
@@ -105,19 +105,19 @@ jobs: | |
python-version: '3.8' | ||
|
||
- name: Download CVAT server image | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: cvat_server | ||
path: /tmp/cvat_server/ | ||
|
||
- name: Download CVAT UI images | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: cvat_ui | ||
path: /tmp/cvat_ui/ | ||
|
||
- name: Download CVAT SDK package | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: cvat_sdk | ||
path: /tmp/cvat_sdk/ | ||
|
@@ -133,24 +133,22 @@ jobs: | |
- name: Verify API schema | ||
id: verify_schema | ||
run: | | ||
docker run --rm --entrypoint /bin/bash cvat/server:${CVAT_VERSION} \ | ||
docker run --rm cvat/server:${CVAT_VERSION} bash \ | ||
-c 'python manage.py spectacular' > cvat/schema-expected.yml | ||
if ! git diff --no-index cvat/schema.yml cvat/schema-expected.yml; then | ||
echo | ||
echo 'API schema has changed! Please update cvat/schema.yml:' | ||
echo | ||
echo ' docker run --rm --entrypoint /bin/bash cvat/server:dev \' | ||
echo ' docker run --rm cvat/server:dev bash \' | ||
echo " -c 'python manage.py spectacular' > cvat/schema.yml" | ||
exit 1 | ||
fi | ||
- name: Upload expected schema as an artifact | ||
if: failure() && steps.verify_schema.conclusion == 'failure' | ||
uses: actions/[email protected] | ||
with: | ||
name: expected_schema | ||
path: cvat/schema-expected.yml | ||
- name: Verify migrations | ||
run: | | ||
docker run --rm cvat/server:${CVAT_VERSION} bash \ | ||
-c 'python manage.py makemigrations --check' | ||
- name: Generate SDK | ||
run: | | ||
|
@@ -160,7 +158,8 @@ jobs: | |
- name: Install SDK | ||
run: | | ||
pip3 install -r ./tests/python/requirements.txt \ | ||
-e './cvat-sdk[pytorch]' -e ./cvat-cli | ||
-e './cvat-sdk[pytorch]' -e ./cvat-cli \ | ||
--extra-index-url https://download.pytorch.org/whl/cpu | ||
- name: Running REST API and SDK tests | ||
id: run_tests | ||
|
@@ -180,7 +179,7 @@ jobs: | |
- name: Uploading "cvat" container logs as an artifact | ||
if: failure() && steps.run_tests.conclusion == 'failure' | ||
uses: actions/upload-artifact@v3.1.2 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: rest_api_container_logs | ||
path: "${{ github.workspace }}/rest_api_testing" | ||
|
@@ -194,7 +193,7 @@ jobs: | |
ref: ${{ inputs.ref }} | ||
|
||
- name: Download CVAT server image | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: cvat_server | ||
path: /tmp/cvat_server/ | ||
|
@@ -207,11 +206,10 @@ jobs: | |
- name: Running OPA tests | ||
run: | | ||
python cvat/apps/iam/rules/tests/generate_tests.py \ | ||
--output-dir cvat/apps/iam/rules/ | ||
python cvat/apps/iam/rules/tests/generate_tests.py | ||
docker compose run --rm -v "$PWD/cvat/apps/iam/rules/:/mnt/rules" \ | ||
cvat_opa test /mnt/rules | ||
docker compose run --rm -v "$PWD:/mnt/src:ro" -w /mnt/src \ | ||
cvat_opa test cvat/apps/*/rules | ||
- name: Running unit tests | ||
env: | ||
|
@@ -240,7 +238,7 @@ jobs: | |
- name: Uploading "cvat" container logs as an artifact | ||
if: failure() | ||
uses: actions/upload-artifact@v3.1.1 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: unit_tests_container_logs | ||
path: "${{ github.workspace }}/unit_testing" | ||
|
@@ -265,13 +263,13 @@ jobs: | |
node-version: '16.x' | ||
|
||
- name: Download CVAT server image | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: cvat_server | ||
path: /tmp/cvat_server/ | ||
|
||
- name: Download CVAT UI image | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: cvat_ui | ||
path: /tmp/cvat_ui/ | ||
|
@@ -340,14 +338,14 @@ jobs: | |
- name: Uploading "cvat" container logs as an artifact | ||
if: failure() | ||
uses: actions/upload-artifact@v3.1.1 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: e2e_container_logs | ||
name: e2e_container_logs_${{ matrix.specs }} | ||
path: ${{ github.workspace }}/tests/cvat_${{ matrix.specs }}.log | ||
|
||
- name: Uploading cypress screenshots as an artifact | ||
if: failure() | ||
uses: actions/upload-artifact@v3.1.1 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: cypress_screenshots_${{ matrix.specs }} | ||
path: ${{ github.workspace }}/tests/cypress/screenshots |
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.