Skip to content

Commit

Permalink
Fix the use of multiple artifacts with same name
Browse files Browse the repository at this point in the history
The v4 of upload-artifact/download-artifact no longer supports uploads
with the same name being extended, instead, we now need to create a new
upload for each run, and download each one.

see <https://github.com/actions/upload-artifact/blob/main/docs/MIGRATION.md#multiple-uploads-to-the-same-named-artifact>
  • Loading branch information
ItsDrike committed Apr 27, 2024
1 parent 0b9c10e commit 2836898
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage
name: coverage.${{ matrix.platform }}.${{ matrix.python-version }}
path: .coverage.${{ matrix.platform }}.${{ matrix.python-version }}
retention-days: 1
if-no-files-found: error
Expand All @@ -64,10 +64,11 @@ jobs:
python-version: 3.11
install-args: "--no-root --only test"

- name: Download coverage artifact
- name: Download all coverage artifacts
uses: actions/download-artifact@v4
with:
name: coverage
pattern: coverage.*
merge-multiple: true # support downloading multiple artifacts to same dir

# Combine all of the coverage files (for each os, python version - from matrix)
# into a single coverage file (.coverage), and produce a final (combined) coverage report.
Expand Down

0 comments on commit 2836898

Please sign in to comment.