Skip to content

Commit

Permalink
ci: Update Go setup workflow references
Browse files Browse the repository at this point in the history
  • Loading branch information
mattevans committed Dec 18, 2024
1 parent bdda140 commit 20a86e7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/go-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:

- name: Set up Go
uses: ./.github/workflows/go-setup
with:
go-version: ${{ vars.GO_VERSION }}

- name: Run Tests
run: |
Expand All @@ -35,17 +33,18 @@ jobs:
# Get total package count and calculate split
COUNT=$(echo "$PKGS" | wc -l)
SPLIT=$((COUNT / 4))
START=$(((matrix.test-group - 1) * SPLIT))
GROUP=${{ matrix.test-group }}
START=$(((GROUP - 1) * SPLIT))
# Select packages for this group
if [ "${{ matrix.test-group }}" == "4" ]; then
if [ "$GROUP" == "4" ]; then
TEST_PKGS=$(echo "$PKGS" | tail -n +$START)
else
TEST_PKGS=$(echo "$PKGS" | tail -n +$START | head -n $SPLIT)
fi
# Run tests for this group with JSON output
go test -v -race -json $TEST_PKGS > test.${{ matrix.test-group }}.json
go test -v -race -json $TEST_PKGS > test.$GROUP.json
- name: Upload test results
if: always()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fetch-depth: 0

- name: Set up Go
uses: ./.github/workflows/go-setup.yml
uses: ./.github/workflows/go-setup

- name: golangci-lint
uses: golangci/golangci-lint-action@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fetch-depth: 0

- name: Set up Go
uses: ./.github/workflows/go-setup.yml
uses: ./.github/workflows/go-setup

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
Expand Down

0 comments on commit 20a86e7

Please sign in to comment.