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

[#2933] Run select tests sequentially #1536

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
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
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
test-type: [main, elastic, openklant]
test-type: [main, elastic, openklant, sequential]
pi-sigma marked this conversation as resolved.
Show resolved Hide resolved

services:
postgres:
Expand Down Expand Up @@ -67,11 +67,14 @@ jobs:
src/manage.py test src \
--parallel \
--exclude-tag=e2e \
--exclude-tag=elastic
--exclude-tag=elastic \
--exclude-tag=sequential
elif [ "${{ matrix.test-type }}" = "elastic" ]; then
coverage run -p src/manage.py test src --tag=elastic --exclude-tag=e2e
elif [ "${{ matrix.test-type }}" = "openklant" ]; then
coverage run -m pytest --block-network --record-mode=none -vvv src/openklant2
elif [ "${{ matrix.test-type }}" = "sequential" ]; then
coverage run -p src/manage.py test src --tag=sequential
else
echo "Error: Unknown test type '${{ matrix.test-type }}'"
exit 1
Expand Down Expand Up @@ -113,6 +116,7 @@ jobs:
mv coverages/main/.coverage* .
mv coverages/elastic/.coverage* .
mv coverages/openklant/.coverage* .
mv coverages/sequential/.coverage* .
coverage combine
- name: Publish coverage report
uses: codecov/codecov-action@v3
Expand Down
3 changes: 2 additions & 1 deletion src/open_inwoner/openklant/tests/test_signal.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.contrib.auth import user_logged_in
from django.test import RequestFactory
from django.test import RequestFactory, tag

import requests_mock
from django_webtest import WebTest
Expand All @@ -19,6 +19,7 @@
from open_inwoner.utils.tests.helpers import AssertTimelineLogMixin


@tag("sequential")
@requests_mock.Mocker()
class UpdateUserFromLoginSignalAPITestCase(
ClearCachesMixin, DisableRequestLogMixin, AssertTimelineLogMixin, WebTest
Expand Down
Loading