ci: drop test matrix, run a single Go version from go.mod

The test job ran a 1.24.x/1.25.x matrix, but go.mod requires go 1.25.0, so the
1.24 entry just auto-downloaded the 1.25 toolchain and tested the same thing
twice. Replace the matrix with a single job that sources its Go version from
go.mod via go-version-file, and reference the resolved version through the
setup-go step output in summaries, artifact names, and Codecov flags.
This commit is contained in:
2026-06-15 17:12:19 +00:00
parent bf07d6a172
commit 7933f52003
+11 -15
View File
@@ -35,19 +35,15 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
contents: write contents: write
strategy:
matrix:
go:
- 1.24.x
- 1.25.x
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- name: Set up Go ${{ matrix.go }} - name: Set up Go
id: setup-go
uses: actions/setup-go@v6 uses: actions/setup-go@v6
with: with:
go-version: ${{ matrix.go }} go-version-file: go.mod
check-latest: true check-latest: true
- name: Install Task - name: Install Task
@@ -70,7 +66,7 @@ jobs:
{ {
cat << EOF cat << EOF
## 🔧 Test Environment ## 🔧 Test Environment
- **Go Version:** ${{ matrix.go }} - **Go Version:** ${{ steps.setup-go.outputs.go-version }}
- **OS:** ubuntu-latest - **OS:** ubuntu-latest
- **Timestamp:** $(date -u) - **Timestamp:** $(date -u)
@@ -90,7 +86,7 @@ jobs:
# Generate test summary # Generate test summary
{ {
cat << EOF cat << EOF
## 🧪 Test Results (Go ${{ matrix.go }}) ## 🧪 Test Results (Go ${{ steps.setup-go.outputs.go-version }})
| Metric | Value | | Metric | Value |
| ----------- | ------------------------------------------------------------- | | ----------- | ------------------------------------------------------------- |
@@ -152,7 +148,7 @@ jobs:
{ {
cat << EOF cat << EOF
## 📊 Code Coverage (Go ${{ matrix.go }}) ## 📊 Code Coverage (Go ${{ steps.setup-go.outputs.go-version }})
**Total Coverage: $COVERAGE** **Total Coverage: $COVERAGE**
@@ -213,7 +209,7 @@ jobs:
if: failure() if: failure()
uses: actions/upload-artifact@v6 uses: actions/upload-artifact@v6
with: with:
name: test-results-go-${{ matrix.go }} name: test-results-go-${{ steps.setup-go.outputs.go-version }}
path: | path: |
test-output.log test-output.log
coverage/ coverage/
@@ -223,7 +219,7 @@ jobs:
run: | run: |
{ {
cat << EOF cat << EOF
## 🔍 Static Analysis (Go ${{ matrix.go }}) ## 🔍 Static Analysis (Go ${{ steps.setup-go.outputs.go-version }})
EOF EOF
@@ -268,7 +264,7 @@ jobs:
if: always() if: always()
run: | run: |
cat >> "$GITHUB_STEP_SUMMARY" << 'EOF' cat >> "$GITHUB_STEP_SUMMARY" << 'EOF'
## 📋 Job Summary (Go ${{ matrix.go }}) ## 📋 Job Summary (Go ${{ steps.setup-go.outputs.go-version }})
| Step | Status | | Step | Status |
| --------------- | --------------------------------------------------------------- | | --------------- | --------------------------------------------------------------- |
@@ -284,7 +280,7 @@ jobs:
uses: codecov/codecov-action@v5 uses: codecov/codecov-action@v5
with: with:
files: ./coverage/coverage.out files: ./coverage/coverage.out
flags: Go ${{ matrix.go }} flags: Go ${{ steps.setup-go.outputs.go-version }}
slug: kjanat/articulate-parser slug: kjanat/articulate-parser
token: ${{ secrets.CODECOV_TOKEN }} token: ${{ secrets.CODECOV_TOKEN }}
@@ -292,7 +288,7 @@ jobs:
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1 uses: codecov/test-results-action@v1
with: with:
flags: Go ${{ matrix.go }} flags: Go ${{ steps.setup-go.outputs.go-version }}
token: ${{ secrets.CODECOV_TOKEN }} token: ${{ secrets.CODECOV_TOKEN }}
docker-test: docker-test: