Skip to content

Commit

Permalink
chore(ci): multiple integration tests per shard in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
alecthomas committed Dec 17, 2024
1 parent 1c3838d commit 5e87784
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 @@ -257,7 +257,7 @@ jobs:
run: |
set -euo pipefail
# shellcheck disable=SC2046
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"
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 | paste -d '|' - - - | sed 's/|*$//'))}" >> "$GITHUB_OUTPUT"
integration-run:
name: Integration Test
# if: github.event_name != 'pull_request' || github.event.action == 'enqueued' || contains( github.event.pull_request.labels.*.name, 'run-all')
Expand All @@ -281,7 +281,7 @@ jobs:
run: |

Check failure on line 281 in .github/workflows/ci.yml

View workflow job for this annotation

GitHub Actions / Lint

shellcheck reported issue in this script: SC2016:info:3:41: Expressions don't expand in single quotes, use double quotes for that [shellcheck]

Check failure on line 281 in .github/workflows/ci.yml

View workflow job for this annotation

GitHub Actions / Lint

shellcheck reported issue in this script: SC2016:info:3:123: Expressions don't expand in single quotes, use double quotes for that [shellcheck]
set -euo pipefail
# shellcheck disable=SC2046
go test -v -race -tags integration -run '^${{ matrix.test }}$' $(git grep -l '^//go:build integration' | xargs grep -l '^func ${{ matrix.test }}' | xargs -I {} dirname ./{})
go test -v -race -tags integration -run '^$({{ matrix.test }})$' $(git grep -l '^//go:build integration' | xargs grep -lE '^func $({{ matrix.test }})' | xargs -I {} dirname ./{})
infrastructure-shard:
name: Shard Infrastructure Tests
# if: github.event_name != 'pull_request' || github.event.action == 'enqueued' || contains( github.event.pull_request.labels.*.name, 'run-all')
Expand Down

0 comments on commit 5e87784

Please sign in to comment.