Skip to content

Commit

Permalink
ci: Skip optional E2E tests on release branches (#14424)
Browse files Browse the repository at this point in the history
Optional tests should not block releases.

There are two groups of optional tests:
1. Canary type tests
2. Tests that send data to sentry

IMHO both of these can be skipped on release branches, as failure in
either of them should not affect the release. They will (for now) still
run on develop, we can revisit this if we want.
  • Loading branch information
mydea authored Nov 22, 2024
1 parent 6535500 commit 90f958f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,8 @@ jobs:
# - The build job was successful, not skipped
# - AND if the profiling node bindings were either successful or skipped
if: |
always() && needs.job_build.result == 'success' &&
always() &&
needs.job_build.result == 'success' &&
(needs.job_compile_bindings_profiling_node.result == 'success' || needs.job_compile_bindings_profiling_node.result == 'skipped')
needs: [job_get_metadata, job_build, job_compile_bindings_profiling_node]
runs-on: ubuntu-20.04-large-js
Expand Down Expand Up @@ -981,13 +982,16 @@ jobs:
directory: dev-packages/e2e-tests
token: ${{ secrets.CODECOV_TOKEN }}

# - We skip optional tests on release branches
job_optional_e2e_tests:
name: E2E ${{ matrix.label || matrix.test-application }} Test
# We only run E2E tests for non-fork PRs because the E2E tests require secrets to work and they can't be accessed from forks
# We need to add the `always()` check here because the previous step has this as well :(
# See: https://github.com/actions/runner/issues/2205
if:
always() && needs.job_e2e_prepare.result == 'success' &&
always() &&
needs.job_get_metadata.outputs.is_release != 'true' &&
needs.job_e2e_prepare.result == 'success' &&
needs.job_e2e_prepare.outputs.matrix-optional != '{"include":[]}' &&
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) &&
github.actor != 'dependabot[bot]'
Expand Down

0 comments on commit 90f958f

Please sign in to comment.