Fix Go version matrix and coverage calculation fragility [FRE-4695]
Some checks failed
CI / build (1.23.x) (push) Has been cancelled
CI / security-scan (push) Has been cancelled

- Update matrix from 1.21.x/1.22.x to 1.23.x to match go.mod
- Replace grep -oP with portable awk for coverage parsing
- Update security-scan job to use 1.23.x

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2026-05-10 17:03:30 -04:00
parent 5dc4a1b742
commit 2b8051efb1

View File

@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
go-version: [1.21.x, 1.22.x] go-version: [1.23.x]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -42,7 +42,7 @@ jobs:
- name: Calculate coverage - name: Calculate coverage
run: | run: |
TOTAL=$(go test -cover ./... 2>&1 | grep -oP '\d+\.\d+%$' | head -1 | tr -d '%') TOTAL=$(go test -cover ./... 2>&1 | awk '/^ok /{for(i=1;i<=NF;i++) if($i~/%$/) print $i}' | head -1 | tr -d '%')
echo "Coverage: ${TOTAL}" echo "Coverage: ${TOTAL}"
if [ -z "$TOTAL" ]; then if [ -z "$TOTAL" ]; then
echo "No coverage data found" echo "No coverage data found"
@@ -74,7 +74,7 @@ jobs:
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:
go-version: 1.21.x go-version: 1.23.x
- name: Run GoSec - name: Run GoSec
uses: securego/gosec@v2 uses: securego/gosec@v2