mirror of
https://github.com/kjanat/articulate-parser.git
synced 2026-08-05 18:04:07 +02:00
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:
+11
-15
@@ -35,19 +35,15 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
strategy:
|
||||
matrix:
|
||||
go:
|
||||
- 1.24.x
|
||||
- 1.25.x
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Set up Go ${{ matrix.go }}
|
||||
- name: Set up Go
|
||||
id: setup-go
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
go-version-file: go.mod
|
||||
check-latest: true
|
||||
|
||||
- name: Install Task
|
||||
@@ -70,7 +66,7 @@ jobs:
|
||||
{
|
||||
cat << EOF
|
||||
## 🔧 Test Environment
|
||||
- **Go Version:** ${{ matrix.go }}
|
||||
- **Go Version:** ${{ steps.setup-go.outputs.go-version }}
|
||||
- **OS:** ubuntu-latest
|
||||
- **Timestamp:** $(date -u)
|
||||
|
||||
@@ -90,7 +86,7 @@ jobs:
|
||||
# Generate test summary
|
||||
{
|
||||
cat << EOF
|
||||
## 🧪 Test Results (Go ${{ matrix.go }})
|
||||
## 🧪 Test Results (Go ${{ steps.setup-go.outputs.go-version }})
|
||||
|
||||
| Metric | Value |
|
||||
| ----------- | ------------------------------------------------------------- |
|
||||
@@ -152,7 +148,7 @@ jobs:
|
||||
|
||||
{
|
||||
cat << EOF
|
||||
## 📊 Code Coverage (Go ${{ matrix.go }})
|
||||
## 📊 Code Coverage (Go ${{ steps.setup-go.outputs.go-version }})
|
||||
|
||||
**Total Coverage: $COVERAGE**
|
||||
|
||||
@@ -213,7 +209,7 @@ jobs:
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: test-results-go-${{ matrix.go }}
|
||||
name: test-results-go-${{ steps.setup-go.outputs.go-version }}
|
||||
path: |
|
||||
test-output.log
|
||||
coverage/
|
||||
@@ -223,7 +219,7 @@ jobs:
|
||||
run: |
|
||||
{
|
||||
cat << EOF
|
||||
## 🔍 Static Analysis (Go ${{ matrix.go }})
|
||||
## 🔍 Static Analysis (Go ${{ steps.setup-go.outputs.go-version }})
|
||||
|
||||
EOF
|
||||
|
||||
@@ -268,7 +264,7 @@ jobs:
|
||||
if: always()
|
||||
run: |
|
||||
cat >> "$GITHUB_STEP_SUMMARY" << 'EOF'
|
||||
## 📋 Job Summary (Go ${{ matrix.go }})
|
||||
## 📋 Job Summary (Go ${{ steps.setup-go.outputs.go-version }})
|
||||
|
||||
| Step | Status |
|
||||
| --------------- | --------------------------------------------------------------- |
|
||||
@@ -284,7 +280,7 @@ jobs:
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
files: ./coverage/coverage.out
|
||||
flags: Go ${{ matrix.go }}
|
||||
flags: Go ${{ steps.setup-go.outputs.go-version }}
|
||||
slug: kjanat/articulate-parser
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
@@ -292,7 +288,7 @@ jobs:
|
||||
if: ${{ !cancelled() }}
|
||||
uses: codecov/test-results-action@v1
|
||||
with:
|
||||
flags: Go ${{ matrix.go }}
|
||||
flags: Go ${{ steps.setup-go.outputs.go-version }}
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
docker-test:
|
||||
|
||||
Reference in New Issue
Block a user