Skip to content

Commit e6ee141

Browse files
authored
Merge pull request #378 from CCPBioSim/355-general-reintroduce-coveralls-step
Fix blocked Coveralls upload by splitting main coverage workflow
2 parents 540b302 + f99af5e commit e6ee141

2 files changed

Lines changed: 64 additions & 13 deletions

File tree

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Coveralls Main
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
12+
concurrency:
13+
group: coveralls-main-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
coveralls:
18+
name: Build main coverage baseline
19+
runs-on: ubuntu-24.04
20+
timeout-minutes: 30
21+
22+
permissions:
23+
contents: read
24+
checks: write
25+
statuses: write
26+
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
30+
31+
- name: Set up Python 3.14
32+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
33+
with:
34+
python-version: "3.14"
35+
36+
- name: Install testing dependencies
37+
run: |
38+
python -m pip install --upgrade pip
39+
python -m pip install -e .[testing]
40+
41+
- name: Run coverage
42+
run: |
43+
python -m pytest tests/unit \
44+
--cov CodeEntropy \
45+
--cov-report term-missing \
46+
--cov-report xml \
47+
-q
48+
49+
- name: Upload coverage to Coveralls
50+
uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e
51+
with:
52+
github-token: ${{ secrets.GITHUB_TOKEN }}
53+
file: coverage.xml
54+
fail-on-error: false

.github/workflows/pr.yaml

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

33
on:
44
pull_request:
5-
push:
6-
branches: [main]
75

86
permissions:
97
contents: read
10-
checks: write
11-
pull-requests: write
128

139
concurrency:
14-
group: pr-${{ github.ref }}
10+
group: pr-ci-${{ github.ref }}
1511
cancel-in-progress: true
1612

1713
jobs:
1814
unit:
1915
name: Unit
20-
if: github.event_name == 'pull_request'
2116
runs-on: ${{ matrix.os }}
2217
timeout-minutes: 25
2318
strategy:
@@ -40,12 +35,11 @@ jobs:
4035
python -m pip install --upgrade pip
4136
python -m pip install -e .[testing]
4237
43-
- name: Pytest (unit) • ${{ matrix.os }}, ${{ matrix.python-version }}
38+
- name: Pytest unit • ${{ matrix.os }}, ${{ matrix.python-version }}
4439
run: python -m pytest tests/unit
4540

4641
discover-systems:
4742
name: Discover regression systems
48-
if: github.event_name == 'pull_request'
4943
runs-on: ubuntu-24.04
5044
outputs:
5145
systems: ${{ steps.set-systems.outputs.systems }}
@@ -68,11 +62,10 @@ jobs:
6862
id: set-systems
6963
run: |
7064
SYSTEMS=$(python -m tests.regression.list_systems)
71-
echo "systems=$SYSTEMS" >> $GITHUB_OUTPUT
65+
echo "systems=$SYSTEMS" >> "$GITHUB_OUTPUT"
7266
7367
regression-quick:
74-
name: Regression (fast) • ${{ matrix.system }}
75-
if: github.event_name == 'pull_request'
68+
name: Regression fast • ${{ matrix.system }}
7669
needs: discover-systems
7770
runs-on: ubuntu-24.04
7871
timeout-minutes: 35
@@ -117,7 +110,6 @@ jobs:
117110
118111
docs:
119112
name: Docs
120-
if: github.event_name == 'pull_request'
121113
needs: unit
122114
runs-on: ubuntu-24.04
123115
timeout-minutes: 25
@@ -150,7 +142,6 @@ jobs:
150142

151143
pre-commit:
152144
name: Pre-commit
153-
if: github.event_name == 'pull_request'
154145
needs: unit
155146
runs-on: ubuntu-24.04
156147
timeout-minutes: 15
@@ -184,6 +175,12 @@ jobs:
184175
runs-on: ubuntu-24.04
185176
timeout-minutes: 30
186177

178+
permissions:
179+
contents: read
180+
checks: write
181+
statuses: write
182+
pull-requests: write
183+
187184
steps:
188185
- name: Checkout
189186
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8

0 commit comments

Comments
 (0)