-
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.
* Remove .travis.yml * Rework env in docker-compose.ci.yml * Add github actions configs * Deleting unnecessary config rows. * Apply comments. Remove unnecessary config rows. * configured coveralls Co-authored-by: Kruchinin <[email protected]> Co-authored-by: Andrey Zhavoronkov <[email protected]>
- Loading branch information
1 parent
c0c1bbc
commit a440ef2
Showing
4 changed files
with
86 additions
and
62 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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
- 'develop' | ||
pull_request: | ||
branches: | ||
- '*' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 12 | ||
- name: Build CVAT | ||
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.ci.yml build | ||
docker-compose -f docker-compose.yml -f docker-compose.ci.yml run cvat_ci /bin/bash -c 'coverage run -a manage.py test cvat/apps utils/cli && mv .coverage ${CONTAINER_COVERAGE_DATA_DIR}' | ||
docker-compose -f docker-compose.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 && mv ./reports/coverage/lcov.info ${CONTAINER_COVERAGE_DATA_DIR} && chmod a+rwx ${CONTAINER_COVERAGE_DATA_DIR}/lcov.info' | ||
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" | ||
- name: Code instrumentation | ||
run: | | ||
npm ci | ||
npm run coverage | ||
docker-compose up -d --build | ||
- name: End-to-end testing | ||
run: | | ||
cd ./tests | ||
npm ci | ||
npx cypress run --headless --browser chrome | ||
- name: Collect coverage data | ||
env: | ||
HOST_COVERAGE_DATA_DIR: ${{ github.workspace }} | ||
CONTAINER_COVERAGE_DATA_DIR: "/coverage_data" | ||
COVERALLS_SERVICE_NAME: github | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
mv ./tests/.nyc_output ./ | ||
npx nyc report --reporter=text-lcov >> ${HOST_COVERAGE_DATA_DIR}/lcov.info | ||
docker-compose -f docker-compose.yml -f docker-compose.ci.yml run cvat_ci /bin/bash -c 'cd ${CONTAINER_COVERAGE_DATA_DIR} && coveralls-lcov -v -n lcov.info > ${CONTAINER_COVERAGE_DATA_DIR}/coverage.json' | ||
docker-compose -f docker-compose.yml -f docker-compose.ci.yml run cvat_ci /bin/bash -c 'ln -s ${CONTAINER_COVERAGE_DATA_DIR}/.git . && ln -s ${CONTAINER_COVERAGE_DATA_DIR}/.coverage . && ln -s ${CONTAINER_COVERAGE_DATA_DIR}/coverage.json . && coveralls --merge=coverage.json' |
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,28 @@ | ||
name: CI-nightly | ||
on: | ||
schedule: | ||
- cron: '0 22 * * *' | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 12 | ||
- name: Build CVAT | ||
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 ./tests/docker-compose.email.yml up -d --build | ||
/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" | ||
- name: End-to-end testing | ||
run: | | ||
cd ./tests | ||
npm ci | ||
npm run cypress:run:firefox |
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