Skip to content

Commit

Permalink
Merge pull request #1282 from maykinmedia/issues/2589-parallel-test-e…
Browse files Browse the repository at this point in the history
…xecution

[#2589] Run CI tests in parallel
  • Loading branch information
alextreme authored Jun 26, 2024
2 parents e8c25b1 + c7f44f8 commit 6546094
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
tests:
name: Run the Django test suite
runs-on: ubuntu-latest
strategy:
matrix:
test-type: [main, elastic]

services:
postgres:
Expand Down Expand Up @@ -57,13 +60,20 @@ jobs:
setup-node: 'yes'
npm-ci-flags: '--legacy-peer-deps'

# We temporarily disable parallel test runs due to a Django bug:
# https://code.djangoproject.com/ticket/32114
# https://github.com/django/django/pull/17650
- name: Run tests
run: |
python src/manage.py collectstatic --noinput --link
coverage run src/manage.py test src --exclude-tag=e2e
if [ "${{ matrix.test-type }}" = "main" ]; then
coverage run \
src/manage.py test src \
--parallel \
--exclude-tag=e2e \
--exclude-tag=elastic
elif [ "${{ matrix.test-type }}" = "elastic" ]; then
coverage run src/manage.py test src --tag=elastic --exclude-tag=e2e
else
echo "Error: Unknown test type '${{ matrix.test-type }}'"
exit 1
fi
env:
DJANGO_SETTINGS_MODULE: open_inwoner.conf.ci
Expand Down

0 comments on commit 6546094

Please sign in to comment.