Skip to content

Commit 637e249

Browse files
committed
chore(ci): update golangci-lint action to v8 and remove unused steps
1 parent 2483bf6 commit 637e249

File tree

1 file changed

+15
-56
lines changed

1 file changed

+15
-56
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
go-version: ${{ env.GO_VERSION }}
2424

2525
- name: golangci-lint
26-
uses: golangci/golangci-lint-action@v4
26+
uses: golangci/golangci-lint-action@v8
2727
with:
2828
version: latest
2929
args: --timeout=5m
@@ -46,22 +46,21 @@ jobs:
4646
- name: Verify dependencies
4747
run: go mod verify
4848

49-
- name: Run tests
50-
run: go test -v -race -coverprofile=coverage.out -covermode=atomic ./...
49+
- name: Run Go tests (JSON + coverage)
50+
run: |
51+
go test -json -coverprofile=coverage.out -covermode=atomic ./... | tee test2json.log
5152
52-
- name: Upload coverage to Codecov
53-
uses: codecov/codecov-action@v4
54-
with:
55-
file: ./coverage.out
56-
flags: unittests
57-
name: codecov-umbrella
53+
- name: Convert test output to CTRF
54+
run: |
55+
go run github.com/ctrf-io/go-ctrf-json-reporter/cmd/go-ctrf-json-reporter@latest \
56+
--input test2json.log --output ctrf/tests.json
5857
59-
- name: Generate test summary
60-
uses: test-summary/action@v2
61-
with:
62-
paths: |
63-
coverage.out
58+
- name: Publish Test Report
59+
uses: ctrf-io/github-test-reporter@v1
6460
if: always()
61+
with:
62+
report-path: './ctrf/tests.json'
63+
github-report: true
6564

6665
build:
6766
name: Build
@@ -114,46 +113,6 @@ jobs:
114113
go-version: ${{ env.GO_VERSION }}
115114

116115
- name: Run Gosec Security Scanner
117-
uses: securecodewarrior/github-action-gosec@master
118-
with:
119-
args: '-fmt sarif -out gosec.sarif ./...'
120-
121-
- name: Upload SARIF file
122-
uses: github/codeql-action/upload-sarif@v3
116+
uses: securego/gosec@master
123117
with:
124-
sarif_file: gosec.sarif
125-
126-
- name: Run Trivy vulnerability scanner
127-
uses: aquasecurity/trivy-action@master
128-
with:
129-
scan-type: 'fs'
130-
scan-ref: '.'
131-
format: 'sarif'
132-
output: 'trivy-results.sarif'
133-
134-
- name: Upload Trivy scan results to GitHub Security tab
135-
uses: github/codeql-action/upload-sarif@v3
136-
with:
137-
sarif_file: 'trivy-results.sarif'
138-
139-
dependency-check:
140-
name: Dependency Check
141-
runs-on: ubuntu-latest
142-
steps:
143-
- name: Checkout
144-
uses: actions/checkout@v4
145-
146-
- name: Set up Go
147-
uses: actions/setup-go@v4
148-
with:
149-
go-version: ${{ env.GO_VERSION }}
150-
151-
- name: Check for known vulnerabilities
152-
uses: sonatypecommunity/nancy-github-action@main
153-
with:
154-
nancyVersion: v1.0.46
155-
156-
- name: Run govulncheck
157-
run: |
158-
go install golang.org/x/vuln/cmd/govulncheck@latest
159-
govulncheck ./...
118+
args: ./...

0 commit comments

Comments
 (0)