diff --git a/.github/actions/run-transport-interop-test/action.yml b/.github/actions/run-transport-interop-test/action.yml index 2792da95b..032ca968e 100644 --- a/.github/actions/run-transport-interop-test/action.yml +++ b/.github/actions/run-transport-interop-test/action.yml @@ -5,6 +5,14 @@ inputs: description: "Filter which tests to run out of the created matrix" required: false default: "" + upload-results: + description: "Upload the test results as an artifact" + required: false + default: "true" + test-results-suffix: + description: "Suffix to add to the test results artifact name" + required: false + default: "" test-ignore: description: "Exclude tests from the created matrix that include this string in their name" required: false @@ -141,10 +149,11 @@ runs: exit 0 fi shell: bash - - - uses: actions/upload-artifact@v4 + - name: Upload test results + if: ${{ inputs.upload-results == 'true' }} + uses: actions/upload-artifact@v4 with: - name: test-plans-output + name: ${{ inputs.test-results-suffix && format('test-plans-output-{0}', inputs.test-results-suffix) || 'test-plans-output' }} path: | ${{ steps.find-workdir.outputs.WORK_DIR }}/results.csv ${{ steps.find-workdir.outputs.WORK_DIR }}/dashboard.md diff --git a/.github/workflows/transport-interop.yml b/.github/workflows/transport-interop.yml index e5fcc6dc2..b15e959c8 100644 --- a/.github/workflows/transport-interop.yml +++ b/.github/workflows/transport-interop.yml @@ -2,18 +2,20 @@ on: workflow_dispatch: pull_request: paths: - - 'transport-interop/**' + - "transport-interop/**" + - ".github/actions/run-transport-interop-test/action.yml" + - ".github/workflows/transport-interop.yml" push: branches: - "master" paths: - - 'transport-interop/**' + - "transport-interop/**" name: libp2p transport interop test jobs: run-transport-interop: - runs-on: ['self-hosted', 'linux', 'x64', '4xlarge'] # https://github.com/pl-strflt/tf-aws-gh-runner/blob/main/runners.tf + runs-on: ["self-hosted", "linux", "x64", "4xlarge"] # https://github.com/pl-strflt/tf-aws-gh-runner/blob/main/runners.tf steps: - uses: actions/checkout@v3 - uses: ./.github/actions/run-transport-interop-test @@ -23,11 +25,12 @@ jobs: s3-secret-access-key: ${{ secrets.S3_LIBP2P_BUILD_CACHE_AWS_SECRET_ACCESS_KEY }} worker-count: 16 build-without-secrets: - runs-on: ['self-hosted', 'linux', 'x64', '4xlarge'] # https://github.com/pl-strflt/tf-aws-gh-runner/blob/main/runners.tf + runs-on: ["self-hosted", "linux", "x64", "4xlarge"] # https://github.com/pl-strflt/tf-aws-gh-runner/blob/main/runners.tf steps: - uses: actions/checkout@v3 # Purposely not using secrets to replicate how forks will behave. - uses: ./.github/actions/run-transport-interop-test with: # It's okay to not run the tests, we only care to check if the tests build without cache. + upload-results: false test-filter: '"no test matches this, skip all"'