|
11 | 11 | pull_request: |
12 | 12 | branches: |
13 | 13 | - develop |
| 14 | + workflow_dispatch: |
14 | 15 |
|
15 | 16 | env: |
16 | 17 | PYTHON_VERSION: '3.9' |
17 | 18 | DJANGO_SUPERUSER_USERNAME: "admin" |
18 | 19 | DJANGO_SUPERUSER_PASSWORD: "passwd" |
19 | | - DJANGO_SUPERUSER_EMAIL: "noreplay@uni.fr" |
| 20 | + DJANGO_SUPERUSER_EMAIL: "noreply@uni.fr" |
20 | 21 | ELASTICSEARCH_TAG: "elasticsearch:7.17.18" |
21 | | - NODE_VERSION: "19" |
22 | | - NODE_TAG: "node:19" |
| 22 | + NODE_VERSION: "20" |
| 23 | + NODE_TAG: "node:20" |
23 | 24 | PYTHON_TAG: "python:3.9-bullseye" |
24 | 25 | REDIS_TAG: "redis:alpine3.16" |
25 | 26 | DOCKER_ENV: "full-test" |
@@ -55,18 +56,17 @@ jobs: |
55 | 56 |
|
56 | 57 | - name: Install Dependencies |
57 | 58 | run: | |
58 | | - sudo apt-get clean |
59 | 59 | sudo apt-get update |
60 | | - sudo apt-get install ffmpeg |
61 | | - sudo apt-get install -y ffmpegthumbnailer |
| 60 | + sudo apt-get install -y --no-install-recommends ffmpeg ffmpegthumbnailer |
| 61 | + sudo apt-get clean |
| 62 | + sudo rm -rf /var/lib/apt/lists/* |
62 | 63 | python -m pip install --upgrade pip |
63 | 64 | pip install -r requirements-dev.txt |
64 | 65 | sudo npm install -g yarn |
65 | 66 |
|
66 | | - # FLAKE 8 |
| 67 | + # FLAKE 8 (see setup.cfg for configurations) |
67 | 68 | - name: Flake8 compliance |
68 | | - run: | |
69 | | - flake8 --max-complexity=7 --ignore=E501,W503,E203 --exclude .git,pod/*/migrations/*.py,test_settings.py,node_modules/*/*.py,pod/static/*.py,pod/custom/tenants/*/*.py |
| 69 | + run: flake8 |
70 | 70 |
|
71 | 71 | ## Start remote encoding and transcoding test ## |
72 | 72 | - name: Create settings local file |
@@ -106,7 +106,7 @@ jobs: |
106 | 106 | docker exec pod-back-with-volumes ps auxf |
107 | 107 | docker exec pod-back-with-volumes python manage.py loaddata pod/video/fixtures/sample_videos.json |
108 | 108 | - name: run test in docker |
109 | | - run: docker exec pod-back-with-volumes coverage run --append --source='.' manage.py test -v 3 --keepdb pod.video_encode_transcript.tests.test_remote_encode_transcode |
| 109 | + run: docker exec pod-back-with-volumes coverage run --append manage.py test -v 3 --keepdb pod.video_encode_transcript.tests.test_remote_encode_transcode |
110 | 110 |
|
111 | 111 | - name: Run pa11y-ci full |
112 | 112 | run: docker exec pa11y-ci pa11y-ci -c /usr/src/app/dockerfile-dev-with-volumes/pa11y-ci/config.json |
@@ -135,15 +135,22 @@ jobs: |
135 | 135 |
|
136 | 136 | - name: Setup Pod |
137 | 137 | run: | |
138 | | - coverage run --append --source='.' manage.py create_pod_index --settings=pod.main.test_settings |
| 138 | + coverage run --append manage.py create_pod_index --settings=pod.main.test_settings |
139 | 139 | python manage.py makemigrations --settings=pod.main.test_settings |
140 | 140 | python manage.py migrate --settings=pod.main.test_settings |
141 | 141 |
|
142 | 142 | - name: Run Tests with coverage |
143 | 143 | env: |
144 | 144 | PYTHONUNBUFFERED: 1 |
145 | 145 | run: | |
146 | | - coverage run --append --source='.' manage.py test -v 3 --settings=pod.main.test_settings |
| 146 | + coverage run --append manage.py test -v 3 --settings=pod.main.test_settings |
| 147 | + coverage xml -o cobertura.xml |
| 148 | +
|
| 149 | + - name: Codacy coverage reporter |
| 150 | + run: bash <(curl -Ls https://coverage.codacy.com/get.sh) |
| 151 | + continue-on-error: true |
| 152 | + env: |
| 153 | + CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} |
147 | 154 |
|
148 | 155 | - name: Send coverage to coveralls.io |
149 | 156 | # coveralls command has been installed by requirements-dev.txt |
|
0 commit comments