Skip to content

Commit 35726ce

Browse files
authored
Merge pull request #80 from per1234/v4-artifact-coverage
Generate v1 and v2 format test data artifacts
2 parents f586e73 + a423f1d commit 35726ce

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/workflows/upload-report-artifact.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ jobs:
2222
parameters:
2323
# Coverage for pre-actions/upload-artifact@v4 approach where all reports are stored in a single artifact.
2424
- artifact-name-suffix: multi
25+
artifact-version: 1
2526
reports-folder: multi-report-artifact
2627
# Coverage for actions/upload-artifact@v4 approach where each report is stored in a separate artifact.
2728
- artifact-name-suffix: arduino-samd-mkrzero
29+
artifact-version: 2
2830
reports-folder: per-report-artifact
2931

3032
steps:
@@ -45,9 +47,20 @@ jobs:
4547
jq '.commit_hash = "${{ github.event.pull_request.head.sha }}"' "$reportFile" > "${SKETCHES_REPORTS_PATH}/$reportFile"
4648
done
4749
48-
- name: Save sketches report as workflow artifact
50+
- name: Save sketches report as v1 format workflow artifact
51+
if: matrix.parameters.artifact-version == '1'
52+
# actions/upload-artifact 3.x is the last version to produce v1 format artifacts:
53+
# https://github.com/actions/upload-artifact/blob/main/README.md#v4---whats-new
4954
uses: actions/upload-artifact@v3
5055
with:
5156
if-no-files-found: error
5257
path: ${{ env.SKETCHES_REPORTS_PATH }}
5358
name: ${{ env.ARTIFACT_NAME_PREFIX }}${{ matrix.parameters.artifact-name-suffix }}
59+
60+
- name: Save sketches report as v2 format workflow artifact
61+
if: matrix.parameters.artifact-version == '2'
62+
uses: actions/upload-artifact@v4
63+
with:
64+
if-no-files-found: error
65+
path: ${{ env.SKETCHES_REPORTS_PATH }}
66+
name: ${{ env.ARTIFACT_NAME_PREFIX }}${{ matrix.parameters.artifact-name-suffix }}

0 commit comments

Comments
 (0)