Skip to content

Commit 7693b90

Browse files
committed
merge pytest and upload artefact to one step
1 parent c2ee228 commit 7693b90

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/python-package.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,14 @@ jobs:
4343
run: |
4444
pytest --disable-warnings -p no:warnings test --cov=aspired --cov-report=xml --cov-report=term --cov-config=setup.cfg --cov-branch
4545
ls -la
46-
cp .coverage .coverage.${{ matrix.os }}.${{ matrix.python-version }}
47-
- name: Upload coverage data
48-
uses: actions/upload-artifact@v4
49-
with:
50-
name: coverage-data-${{ matrix.os }}-${{ matrix.python-version }}
51-
path: .coverage.${{ matrix.os }}.${{ matrix.python-version }}
46+
cp .coverage .coverage_${{ matrix.os }}_${{ matrix.python-version }}
47+
ls -la
48+
- uses: actions/upload-artifact@v4
49+
if: always() # Upload even if tests fail
50+
with:
51+
name: coverage-data-${{ matrix.os }}-${{ matrix.python-version }}
52+
path: .coverage_${{ matrix.os }}_${{ matrix.python-version }}
53+
5254
- name: Coveralls
5355
if: startsWith(matrix.os, 'ubuntu') && endsWith(matrix.python-version, '3.14')
5456
uses: coverallsapp/github-action@v2

0 commit comments

Comments
 (0)