Skip to content

Commit

Permalink
go.mod: bump to go1.20 (#24)
Browse files Browse the repository at this point in the history
Update github actions
Fix staticheck lint.
  • Loading branch information
maruel authored Apr 27, 2023
1 parent f88d4d2 commit 947a612
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 20 deletions.
28 changes: 10 additions & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
# benchmarks. At the end do a quick check to ensure the tests to not leave
# files in the tree.
test:
name: "test: go${{matrix.gover}}.x/${{matrix.os}}"
name: "test: ${{matrix.os}}"
runs-on: "${{matrix.os}}"
continue-on-error: true
defaults:
Expand All @@ -29,8 +29,6 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
# Do not forget to bump every 6 months!
gover: ["1.19"]
env:
PYTHONDONTWRITEBYTECODE: x
steps:
Expand All @@ -40,10 +38,9 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version: "~${{matrix.gover}}.0"
cache: true
go-version-file: go.mod
- name: 'go install necessary tools'
if: always()
run: |
Expand All @@ -53,6 +50,7 @@ jobs:
run: go test -timeout=120s -covermode=count -coverprofile coverage.txt -bench=. -benchtime=1x ./...
# Don't send code coverage if anything failed to reduce spam.
- uses: codecov/codecov-action@v2
timeout-minutes: 1
- name: 'Cleanup'
if: always()
run: rm coverage.txt
Expand Down Expand Up @@ -87,7 +85,7 @@ jobs:
# to cut on runtime, at the cost of latency. I dislike waiting for results
# so I prefer to run them in parallel.
lint:
name: "lint: go${{matrix.gover}}.x/${{matrix.os}}"
name: "lint: ${{matrix.os}}"
runs-on: "${{matrix.os}}"
continue-on-error: true
defaults:
Expand All @@ -100,19 +98,16 @@ jobs:
# OS-specific code benefits from explicitly linting on macOS and
# Windows.
os: [ubuntu-latest, macos-latest, windows-latest]
# Do not forget to bump every 6 months!
gover: ["1.19"]
env:
PYTHONDONTWRITEBYTECODE: x
steps:
- name: Turn off git core.autocrlf
if: matrix.os == 'windows-latest'
run: git config --global core.autocrlf false
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version: "~${{matrix.gover}}.0"
cache: true
go-version-file: go.mod
- name: "Debug"
run: |
echo HOME = $HOME
Expand Down Expand Up @@ -296,23 +291,20 @@ jobs:


codeql:
name: "codeql: go${{matrix.gover}}.x/${{matrix.os}}"
name: "codeql: ${{matrix.os}}"
runs-on: "${{matrix.os}}"
continue-on-error: true
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
# Do not forget to bump every 6 months!
gover: ["1.19"]
permissions:
security-events: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version: "~${{matrix.gover}}.0"
cache: true
go-version-file: go.mod
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
Expand Down
5 changes: 4 additions & 1 deletion analog/analog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ func TestINVALID(t *testing.T) {
if INVALID.Halt() == nil {
t.Fatal("Halt")
}
INVALID.Range()
sample := Sample{}
if s1, s2 := INVALID.Range(); s1 != sample || s2 != sample {
t.Fatal("Range")
}
if _, err := INVALID.Read(); err == nil {
t.Fatal("Read")
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

module periph.io/x/conn/v3

go 1.17
go 1.20

// Warning: do not add any external dependencies here unless absolutely necessary.
// This package should primarily depend on the standard library.
Expand Down

0 comments on commit 947a612

Please sign in to comment.