Skip to content

Commit 0adfc24

Browse files
authored
fix: don't upload test results from build-only workflow. Support artifact suffixes (#607)
The build-without-secrets flow was broken because it was trying to upload an empty results artifact to the same name as the interop test. This no longer works in upload-artifacts v4. This fixes it by not uploading that empty file.
1 parent de0fb45 commit 0adfc24

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

Diff for: .github/actions/run-transport-interop-test/action.yml

+12-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ inputs:
55
description: "Filter which tests to run out of the created matrix"
66
required: false
77
default: ""
8+
upload-results:
9+
description: "Upload the test results as an artifact"
10+
required: false
11+
default: "true"
12+
test-results-suffix:
13+
description: "Suffix to add to the test results artifact name"
14+
required: false
15+
default: ""
816
test-ignore:
917
description: "Exclude tests from the created matrix that include this string in their name"
1018
required: false
@@ -141,10 +149,11 @@ runs:
141149
exit 0
142150
fi
143151
shell: bash
144-
145-
- uses: actions/upload-artifact@v4
152+
- name: Upload test results
153+
if: ${{ inputs.upload-results == 'true' }}
154+
uses: actions/upload-artifact@v4
146155
with:
147-
name: test-plans-output
156+
name: ${{ inputs.test-results-suffix && format('test-plans-output-{0}', inputs.test-results-suffix) || 'test-plans-output' }}
148157
path: |
149158
${{ steps.find-workdir.outputs.WORK_DIR }}/results.csv
150159
${{ steps.find-workdir.outputs.WORK_DIR }}/dashboard.md

Diff for: .github/workflows/transport-interop.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,20 @@ on:
22
workflow_dispatch:
33
pull_request:
44
paths:
5-
- 'transport-interop/**'
5+
- "transport-interop/**"
6+
- ".github/actions/run-transport-interop-test/action.yml"
7+
- ".github/workflows/transport-interop.yml"
68
push:
79
branches:
810
- "master"
911
paths:
10-
- 'transport-interop/**'
12+
- "transport-interop/**"
1113

1214
name: libp2p transport interop test
1315

1416
jobs:
1517
run-transport-interop:
16-
runs-on: ['self-hosted', 'linux', 'x64', '4xlarge'] # https://github.com/pl-strflt/tf-aws-gh-runner/blob/main/runners.tf
18+
runs-on: ["self-hosted", "linux", "x64", "4xlarge"] # https://github.com/pl-strflt/tf-aws-gh-runner/blob/main/runners.tf
1719
steps:
1820
- uses: actions/checkout@v3
1921
- uses: ./.github/actions/run-transport-interop-test
@@ -23,11 +25,12 @@ jobs:
2325
s3-secret-access-key: ${{ secrets.S3_LIBP2P_BUILD_CACHE_AWS_SECRET_ACCESS_KEY }}
2426
worker-count: 16
2527
build-without-secrets:
26-
runs-on: ['self-hosted', 'linux', 'x64', '4xlarge'] # https://github.com/pl-strflt/tf-aws-gh-runner/blob/main/runners.tf
28+
runs-on: ["self-hosted", "linux", "x64", "4xlarge"] # https://github.com/pl-strflt/tf-aws-gh-runner/blob/main/runners.tf
2729
steps:
2830
- uses: actions/checkout@v3
2931
# Purposely not using secrets to replicate how forks will behave.
3032
- uses: ./.github/actions/run-transport-interop-test
3133
with:
3234
# It's okay to not run the tests, we only care to check if the tests build without cache.
35+
upload-results: false
3336
test-filter: '"no test matches this, skip all"'

0 commit comments

Comments
 (0)