Skip to content

Commit 81019ea

Browse files
authored
👷 Update Upload/Download artifacts GitHub Actions (fastapi#26)
1 parent d235a7b commit 81019ea

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

.github/workflows/smokeshow.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ jobs:
2424

2525
- run: pip install smokeshow
2626

27-
- uses: dawidd6/action-download-artifact@v3.1.4
27+
- uses: actions/download-artifact@v4
2828
with:
29-
workflow: test.yml
30-
commit: ${{ github.event.workflow_run.head_sha }}
29+
name: coverage-html
30+
path: htmlcov
31+
github-token: ${{ secrets.GITHUB_TOKEN }}
32+
run-id: ${{ github.event.workflow_run.id }}
3133

32-
- run: smokeshow upload coverage-html
34+
- run: smokeshow upload htmlcov
3335
env:
3436
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage}
3537
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 100

.github/workflows/test.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ jobs:
6868
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
6969
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}
7070
- name: Store coverage files
71-
uses: actions/upload-artifact@v3
71+
uses: actions/upload-artifact@v4
7272
with:
73-
name: coverage
73+
name: coverage-${{ matrix.python-version }}
7474
path: coverage
7575

7676
coverage-combine:
@@ -89,17 +89,18 @@ jobs:
8989
# cache: "pip"
9090
# cache-dependency-path: pyproject.toml
9191
- name: Get coverage files
92-
uses: actions/download-artifact@v3
92+
uses: actions/download-artifact@v4
9393
with:
94-
name: coverage
94+
pattern: coverage-*
9595
path: coverage
96+
merge-multiple: true
9697
- run: pip install coverage[toml]
9798
- run: ls -la coverage
9899
- run: coverage combine coverage
99100
- run: coverage report
100101
- run: coverage html --show-contexts --title "Coverage for ${{ github.sha }}"
101102
- name: Store coverage HTML
102-
uses: actions/upload-artifact@v3
103+
uses: actions/upload-artifact@v4
103104
with:
104105
name: coverage-html
105106
path: htmlcov

0 commit comments

Comments
 (0)