mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-21 23:20:10 +01:00
* change go.mod as first step towards go 1.25
raise minium version of go compatiblity to 1.24.9
and toolchain to be used to 1.25.3
* upgrade .github/workflows and documentation
* update all .github/workflows/ to use the latest version of
actions and the go versions accordingly.
(Only some github actions use a floating tag for the major version.)
* reduce places where the go versions are hardcoded:
* refEr to docs/Development.md from README.md
* use `go.mod` from itest.yml.
* fix itest.yml: checkout before refer to go.mod
* improve code cleanness: use format string w error
and thus makes newer go test versions happy
* update go dependencies
* cleanup some dependencies with go mod tidy
* fix .github/workflows action versions
* fix go action versions
62 lines
1.4 KiB
YAML
62 lines
1.4 KiB
YAML
name: Go
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- "**.go"
|
|
pull_request:
|
|
paths:
|
|
- "**.go"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: "stable"
|
|
|
|
- name: Build
|
|
run: go build -v ./cmd/...
|
|
|
|
- name: vet
|
|
run: go vet ./...
|
|
|
|
- name: gofmt
|
|
uses: Jerome1337/gofmt-action@v1.0.5
|
|
with:
|
|
gofmt-flags: "-l -d"
|
|
|
|
- name: Revive Action
|
|
uses: morphy2k/revive-action@v2
|
|
|
|
- name: Tests
|
|
run: go test -v ./...
|
|
|
|
run_modver:
|
|
runs-on: ubuntu-latest
|
|
needs: build # Only run when build job was successful
|
|
if: ${{ github.event_name == 'pull_request' && success() }}
|
|
permissions:
|
|
contents: read # Modver needs to read the repo content
|
|
pull-requests: write # Modver needs to write comments/status on PRs
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0 # Modver needs full history for comparison
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: "stable"
|
|
|
|
- name: Modver
|
|
uses: bobg/modver@v2.12.0
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
pull_request_url: https://github.com/${{ github.repository }}/pull/${{ github.event.number }}
|