From 20a86e7470088ce01b4983734f1754d0b4f04979 Mon Sep 17 00:00:00 2001 From: Matty Evans Date: Thu, 19 Dec 2024 07:11:58 +1000 Subject: [PATCH] ci: Update Go setup workflow references --- .github/workflows/go-test.yml | 9 ++++----- .github/workflows/golangci-lint.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 900a197..c3eee73 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -24,8 +24,6 @@ jobs: - name: Set up Go uses: ./.github/workflows/go-setup - with: - go-version: ${{ vars.GO_VERSION }} - name: Run Tests run: | @@ -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() diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 6b3ac5e..b0a8560 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1551d15..a213f28 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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