Skip to content

Commit cabd476

Browse files
authored
Merge pull request #356 from CCPBioSim/355-general-reintroduce-coveralls-step
Run Coveralls coverage on pull requests and main branch updates
2 parents aa7a64a + f9d8c45 commit cabd476

1 file changed

Lines changed: 17 additions & 4 deletions

File tree

.github/workflows/pr.yaml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ name: Pull Request CI
22

33
on:
44
pull_request:
5+
push:
6+
branches: [main]
7+
8+
permissions:
9+
contents: read
10+
checks: write
11+
pull-requests: write
512

613
concurrency:
714
group: pr-${{ github.ref }}
@@ -10,6 +17,7 @@ concurrency:
1017
jobs:
1118
unit:
1219
name: Unit
20+
if: github.event_name == 'pull_request'
1321
runs-on: ${{ matrix.os }}
1422
timeout-minutes: 25
1523
strategy:
@@ -37,6 +45,7 @@ jobs:
3745

3846
discover-systems:
3947
name: Discover regression systems
48+
if: github.event_name == 'pull_request'
4049
runs-on: ubuntu-24.04
4150
outputs:
4251
systems: ${{ steps.set-systems.outputs.systems }}
@@ -63,7 +72,8 @@ jobs:
6372
6473
regression-quick:
6574
name: Regression (fast) • ${{ matrix.system }}
66-
needs: [unit, discover-systems]
75+
if: github.event_name == 'pull_request'
76+
needs: discover-systems
6777
runs-on: ubuntu-24.04
6878
timeout-minutes: 35
6979

@@ -86,7 +96,7 @@ jobs:
8696
python -m pip install --upgrade pip
8797
python -m pip install -e .[testing]
8898
89-
- name: Run fast regression tests (per system)
99+
- name: Run fast regression tests
90100
run: |
91101
python -m pytest tests/regression \
92102
-m "not slow" \
@@ -96,7 +106,7 @@ jobs:
96106
-vv \
97107
--durations=20
98108
99-
- name: Upload artifacts (failure)
109+
- name: Upload artifacts on failure
100110
if: failure()
101111
uses: actions/upload-artifact@v4
102112
with:
@@ -107,6 +117,7 @@ jobs:
107117
108118
docs:
109119
name: Docs
120+
if: github.event_name == 'pull_request'
110121
needs: unit
111122
runs-on: ubuntu-24.04
112123
timeout-minutes: 25
@@ -139,6 +150,8 @@ jobs:
139150

140151
pre-commit:
141152
name: Pre-commit
153+
if: github.event_name == 'pull_request'
154+
needs: unit
142155
runs-on: ubuntu-24.04
143156
timeout-minutes: 15
144157

@@ -187,7 +200,7 @@ jobs:
187200
188201
- name: Run coverage
189202
run: |
190-
pytest tests/unit \
203+
python -m pytest tests/unit \
191204
--cov CodeEntropy \
192205
--cov-report term-missing \
193206
--cov-report xml \

0 commit comments

Comments
 (0)