Skip to content

Commit a3a05d5

Browse files
committed
fix gha
1 parent 8301acb commit a3a05d5

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

.github/workflows/ci_poetry.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ jobs:
4444

4545
- name: Test core library with pytest
4646
env:
47-
COVERAGE_FILE: "coverage-data-${{ matrix.python-version }}-core"
47+
COVERAGE_FILE: coverage-data-core-${{ matrix.python-version }}
4848
run: poetry run coverage run -m pytest tests --ignore tests/tasks --ignore tests/dev
4949

5050
- name: Upload coverage data
5151
uses: actions/upload-artifact@v4
5252
with:
53-
name: "coverage-data-${{ matrix.python-version }}-core"
54-
path: "coverage-data-*"
53+
name: coverage-data-core-${{ matrix.python-version }}
54+
path: coverage-data-core-${{ matrix.python-version }}*
5555

5656
tests_tasks:
5757
name: "Tasks, Python ${{ matrix.python-version }}"
@@ -99,15 +99,14 @@ jobs:
9999

100100
- name: Test tasks with pytest
101101
env:
102-
COVERAGE_FILE: "coverage-data-${{ matrix.python-version }}-tasks"
103-
102+
COVERAGE_FILE: coverage-data-tasks-${{ matrix.python-version }}
104103
run: poetry run coverage run -m pytest tests/dev tests/tasks -s --log-cli-level info
105104

106105
- name: Upload coverage data
107106
uses: actions/upload-artifact@v4
108107
with:
109-
name: "coverage-data-${{ matrix.python-version }}-tasks"
110-
path: "coverage-data-*"
108+
name: coverage-data-tasks-${{ matrix.python-version }}
109+
path: coverage-data-tasks-${{ matrix.python-version }}*
111110

112111
coverage:
113112
name: Coverage
@@ -129,17 +128,19 @@ jobs:
129128
pattern: coverage-data-*
130129
merge-multiple: true
131130

131+
- name: Combine coverage
132+
# Combines all the downloaded coverage artifacts in a single `.coverage` file,
133+
# which will then be used by `py-cov-action/python-coverage-comment-action`.
134+
# We added this step to replace the variable `MERGE_COVERAGE_FILES: true`
135+
# in the next step, which had started to raise errors
136+
# (https://github.com/fractal-analytics-platform/fractal-server/pull/1725).
137+
run: coverage combine coverage-data-*
138+
132139
- name: Add coverage comment to Pull Requests
133140
id: coverage_comment
134141
uses: py-cov-action/python-coverage-comment-action@v3
135-
env:
136-
# Base name of the data files to operate on. Defaults to `.coverage'.
137-
# [env: COVERAGE_FILE].
138-
# (https://coverage.readthedocs.io/en/latest/cmd.html#cmd-combine)
139-
COVERAGE_FILE: "coverage-data-"
140142
with:
141143
GITHUB_TOKEN: ${{ github.token }}
142-
MERGE_COVERAGE_FILES: true
143144
MINIMUM_GREEN: 90
144145
MINIMUM_ORANGE: 60
145146
ANNOTATE_MISSING_LINES: true

0 commit comments

Comments
 (0)