Skip to content

Commit

Permalink
Update build
Browse files Browse the repository at this point in the history
* Update Go minimum to 1.21 to support new features.
* Update test matrix to latest 3 releases.
* Bump GitHub actions.
* Pin GitHub actions to commit hashes for supply chain security.
* Enable dependabot for GitHub actions.

Signed-off-by: SuperQ <[email protected]>
  • Loading branch information
SuperQ committed Jan 17, 2025
1 parent 48f9949 commit 65fa5fa
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ updates:
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
9 changes: 6 additions & 3 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,21 @@ jobs:
build:
strategy:
matrix:
go-version: ["1.19","1.20"]
go-version:
- "1.21.x"
- "1.22.x"
- "1.23.x"
runs-on: ubuntu-latest

steps:
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: ${{ matrix.go-version }}
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,22 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: ["1.19","1.20"]
go-version:
- "1.21.x"
- "1.22.x"
- "1.23.x"
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}

steps:
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: ${{ matrix.go-version }}
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Run tests
run: go test -race ./...
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/mdlayher/ethtool

go 1.19
go 1.21.0

require (
github.com/google/go-cmp v0.6.0
Expand Down

0 comments on commit 65fa5fa

Please sign in to comment.