go.mod bump to go1.20 (#58)

Update github actions.
pull/64/head v3.7.1
M-A 3 years ago committed by GitHub
parent 8b220202b3
commit c14e02d418
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -19,7 +19,7 @@ jobs:
# benchmarks. At the end do a quick check to ensure the tests to not leave # benchmarks. At the end do a quick check to ensure the tests to not leave
# files in the tree. # files in the tree.
test: test:
name: "test: go${{matrix.gover}}.x/${{matrix.os}}" name: "test: ${{matrix.os}}"
runs-on: "${{matrix.os}}" runs-on: "${{matrix.os}}"
continue-on-error: true continue-on-error: true
defaults: defaults:
@ -29,8 +29,6 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ubuntu-latest, macos-latest, windows-latest] os: [ubuntu-latest, macos-latest, windows-latest]
# Do not forget to bump every 6 months!
gover: ["1.19"]
env: env:
PYTHONDONTWRITEBYTECODE: x PYTHONDONTWRITEBYTECODE: x
steps: steps:
@ -40,10 +38,9 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
fetch-depth: 2 fetch-depth: 2
- uses: actions/setup-go@v3 - uses: actions/setup-go@v4
with: with:
go-version: "~${{matrix.gover}}.0" go-version-file: go.mod
cache: true
- name: 'go install necessary tools' - name: 'go install necessary tools'
if: always() if: always()
run: | run: |
@ -53,6 +50,7 @@ jobs:
run: go test -timeout=120s -covermode=count -coverprofile coverage.txt -bench=. -benchtime=1x ./... run: go test -timeout=120s -covermode=count -coverprofile coverage.txt -bench=. -benchtime=1x ./...
# Don't send code coverage if anything failed to reduce spam. # Don't send code coverage if anything failed to reduce spam.
- uses: codecov/codecov-action@v2 - uses: codecov/codecov-action@v2
timeout-minutes: 1
- name: 'Cleanup' - name: 'Cleanup'
if: always() if: always()
run: rm coverage.txt run: rm coverage.txt
@ -87,7 +85,7 @@ jobs:
# to cut on runtime, at the cost of latency. I dislike waiting for results # to cut on runtime, at the cost of latency. I dislike waiting for results
# so I prefer to run them in parallel. # so I prefer to run them in parallel.
lint: lint:
name: "lint: go${{matrix.gover}}.x/${{matrix.os}}" name: "lint: ${{matrix.os}}"
runs-on: "${{matrix.os}}" runs-on: "${{matrix.os}}"
continue-on-error: true continue-on-error: true
defaults: defaults:
@ -100,8 +98,6 @@ jobs:
# OS-specific code benefits from explicitly linting on macOS and # OS-specific code benefits from explicitly linting on macOS and
# Windows. # Windows.
os: [ubuntu-latest, macos-latest, windows-latest] os: [ubuntu-latest, macos-latest, windows-latest]
# Do not forget to bump every 6 months!
gover: ["1.19"]
env: env:
PYTHONDONTWRITEBYTECODE: x PYTHONDONTWRITEBYTECODE: x
steps: steps:
@ -109,10 +105,9 @@ jobs:
if: matrix.os == 'windows-latest' if: matrix.os == 'windows-latest'
run: git config --global core.autocrlf false run: git config --global core.autocrlf false
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/setup-go@v3 - uses: actions/setup-go@v4
with: with:
go-version: "~${{matrix.gover}}.0" go-version-file: go.mod
cache: true
- name: "Debug" - name: "Debug"
run: | run: |
echo HOME = $HOME echo HOME = $HOME
@ -227,7 +222,7 @@ jobs:
- name: "Check: go mod tidy doesn't modify files" - name: "Check: go mod tidy doesn't modify files"
if: always() if: always()
run: | run: |
go mod tidy -compat=1.17 go mod tidy
TOUCHED=$(git status --porcelain --ignored) TOUCHED=$(git status --porcelain --ignored)
if ! test -z "$TOUCHED"; then if ! test -z "$TOUCHED"; then
echo "go mod tidy was not clean, please update:" echo "go mod tidy was not clean, please update:"
@ -276,23 +271,20 @@ jobs:
codeql: codeql:
name: "codeql: go${{matrix.gover}}.x/${{matrix.os}}" name: "codeql: ${{matrix.os}}"
runs-on: "${{matrix.os}}" runs-on: "${{matrix.os}}"
continue-on-error: true continue-on-error: true
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ubuntu-latest] os: [ubuntu-latest]
# Do not forget to bump every 6 months!
gover: ["1.19"]
permissions: permissions:
security-events: write security-events: write
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/setup-go@v3 - uses: actions/setup-go@v4
with: with:
go-version: "~${{matrix.gover}}.0" go-version-file: go.mod
cache: true
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v2 uses: github/codeql-action/init@v2
with: with:

@ -4,7 +4,7 @@
module periph.io/x/devices/v3 module periph.io/x/devices/v3
go 1.17 go 1.20
require ( require (
github.com/google/go-cmp v0.5.9 github.com/google/go-cmp v0.5.9

Loading…
Cancel
Save