Skip to content

Commit

Permalink
ci: run integration tests if the PR is labelled with "run-integration" (
Browse files Browse the repository at this point in the history
#2353)

The label must be added as the PR is being created, not afterwards.
  • Loading branch information
alecthomas authored Aug 14, 2024
1 parent 2a3edbc commit 2ab778b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ jobs:
- run: cd docs && zola build
integration-shard:
name: Shard Integration Tests
if: github.event_name != 'pull_request' || github.event.action == 'enqueued'
if: github.event_name != 'pull_request' || github.event.action == 'enqueued' || contains( github.event.pull_request.labels.*.name, 'run-integration')
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.extract-tests.outputs.matrix }}
Expand All @@ -195,7 +195,7 @@ jobs:
echo "matrix={\"test\":$(jq -c -n '$ARGS.positional' --args $(git grep -l '^//go:build integration' | xargs grep '^func Test' | awk '{print $2}' | cut -d'(' -f1))}" >> "$GITHUB_OUTPUT"
integration-run:
name: Integration Test
if: github.event_name != 'pull_request' || github.event.action == 'enqueued'
if: github.event_name != 'pull_request' || github.event.action == 'enqueued' || contains( github.event.pull_request.labels.*.name, 'run-integration')
needs: integration-shard
runs-on: ubuntu-latest
strategy:
Expand Down

0 comments on commit 2ab778b

Please sign in to comment.