Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Increase test sharding
Browse files Browse the repository at this point in the history
GitHub Action runners have become exceptionally slow, taking over a
minute and a half to run a single test that takes a couple of seconds
locally. Reduce the number of tests run per shard to compensate for
this.
twpayne committed Jan 10, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 056d819 commit 54955b0
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -131,7 +131,7 @@ jobs:
strategy:
fail-fast: false
matrix:
test-index: [0, 1, 2]
test-index: [0, 1, 2, 3]
needs: changes
if: github.event_name == 'push' || needs.changes.outputs.code == 'true'
runs-on: macos-15
@@ -169,9 +169,11 @@ jobs:
go test ./... -short -race
go test ./internal/cmd -run=TestScript -filter='^[0-9a-dA-D]' -race
elif [ "${{ matrix.test-index }}" = "1" ]; then
go test ./internal/cmd -run=TestScript -filter='^[e-iE-I]' -race
go test ./internal/cmd -run=TestScript -filter='^[e-hE-H]' -race
elif [ "${{ matrix.test-index }}" = "2" ]; then
go test ./internal/cmd -run=TestScript -filter='^[i-qI-Q]' -race
else
go test ./internal/cmd -run=TestScript -filter='^[j-zJ-Z]' -race
go test ./internal/cmd -run=TestScript -filter='^[r-zR-Z]' -race
fi
test-oldstable-go:
needs: changes
@@ -353,7 +355,7 @@ jobs:
strategy:
fail-fast: false
matrix:
test-index: [0, 1, 2]
test-index: [0, 1, 2, 3]
needs: changes
if: github.event_name == 'push' || needs.changes.outputs.code == 'true'
runs-on: windows-2022
@@ -378,9 +380,11 @@ jobs:
go test ./... -short -race
go test ./internal/cmd -run=TestScript -filter='^[0-9a-cA-C]' -race
} elseif (${{ matrix.test-index }} -eq 1) {
go test ./internal/cmd -run=TestScript -filter='^[d-lD-L]' -race
go test ./internal/cmd -run=TestScript -filter='^[d-fD-F]' -race
} elseif (${{ matrix.test-index }} -eq 2) {
go test ./internal/cmd -run=TestScript -filter='^[g-mG-M]' -race
} else {
go test ./internal/cmd -run=TestScript -filter='^[m-zM-Z]' -race
go test ./internal/cmd -run=TestScript -filter='^[n-zN-Z]' -race
}
check:
runs-on: ubuntu-22.04

0 comments on commit 54955b0

Please sign in to comment.