Skip to content

Commit

Permalink
Update go.mod to 1.22 and update github actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
maruel committed Aug 9, 2024
1 parent 947a612 commit 80a168b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 50 deletions.
61 changes: 12 additions & 49 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ jobs:
- name: Turn off git core.autocrlf
if: matrix.os == 'windows-latest'
run: git config --global core.autocrlf false
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: 'go install necessary tools'
Expand All @@ -49,8 +49,9 @@ jobs:
if: always()
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
- uses: codecov/codecov-action@v4
with:
token: ${{secrets.CODECOV_TOKEN}}
- name: 'Cleanup'
if: always()
run: rm coverage.txt
Expand Down Expand Up @@ -104,18 +105,10 @@ jobs:
- 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@v4
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: "Debug"
run: |
echo HOME = $HOME
echo GITHUB_WORKSPACE = $GITHUB_WORKSPACE
echo PATH = $PATH
echo ""
echo $ ls -l $HOME/go/bin
ls -la $HOME/go/bin
- name: 'go install necessary tools'
if: always()
run: |
Expand Down Expand Up @@ -260,36 +253,6 @@ jobs:
go test -short ./...
# Ensure tests pass on oldest supported Go version.
old:
name: "test: go${{matrix.gover}}/${{matrix.os}}"
runs-on: "${{matrix.os}}"
continue-on-error: true
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
# https://github.com/golang/go/issues/55078
# golang.org/x/sys/unix broke on Go versions before 1.17. Not worth
# fixing.
gover: ['1.17.13']
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
with:
go-version: "=${{matrix.gover}}"
- name: 'Check: go test'
run: go test -timeout=120s -bench=. -benchtime=1x ./...


codeql:
name: "codeql: ${{matrix.os}}"
runs-on: "${{matrix.os}}"
Expand All @@ -301,15 +264,15 @@ jobs:
permissions:
security-events: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: go
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
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.20
go 1.22

// 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 80a168b

Please sign in to comment.