Skip to content

Commit 2e93afb

Browse files
committed
run coverage only for one matrix combination
1 parent b1572f8 commit 2e93afb

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

.github/workflows/workflow.yaml

+14-4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66

77
env:
88
GITHUB_WORKFLOW: true
9+
COVERAGE_PYTHON_VERSION: 3.12
10+
COVERAGE_DJANGO_VERSION: 5.1
11+
COVERAGE_DATABASE: postgres
912

1013
jobs:
1114
linting:
@@ -129,13 +132,19 @@ jobs:
129132
- name: Install package
130133
run: pip install -e .
131134

132-
- name: Run tests and coverage
133-
run: coverage run --source=django_scrubber manage.py test
135+
- name: Run tests
136+
run: python manage.py test
134137
env:
135138
DATABASE_ENGINE: ${{ matrix.database }}
136139

137-
- name: Publish coverage
140+
- name: Coverage
138141
if: |
142+
matrix.python == env.COVERAGE_PYTHON_VERSION
143+
&&
144+
matrix.django == env.COVERAGE_DJANGO_VERSION
145+
&&
146+
matrix.database == env.COVERAGE_DATABASE
147+
&&
139148
github.repository == 'RegioHelden/django-scrubber'
140149
&&
141150
(
@@ -147,10 +156,11 @@ jobs:
147156
github.head_ref == 'master'
148157
)
149158
)
159+
run: pip install coverage coveralls && coverage run --source=django_scrubber manage.py test && coveralls
150160
env:
151161
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
152162
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
153-
run: coveralls
163+
DATABASE_ENGINE: ${{ matrix.database }}
154164

155165
build:
156166
name: Build package

requirements.txt

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
bump-my-version==0.32.1
2-
coverage==7.6.12
3-
coveralls==4.0.1
42
factory_boy==3.3.3
53
faker==36.1.1

0 commit comments

Comments
 (0)