Skip to content

Commit

Permalink
[#2589] Run CI tests in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
swrichards committed Jun 26, 2024
1 parent 4b02eb4 commit 60a21db
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 60a21db

Please sign in to comment.