Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#2589] Run CI tests in parallel #1282

Merged
merged 1 commit into from
Jun 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading