From 389e8ce48968dda8592b3387cf7fa15fabfb72ab Mon Sep 17 00:00:00 2001 From: Marc-Antoine Ruel Date: Thu, 27 Apr 2023 10:03:37 -0400 Subject: [PATCH] go.mod bump to go1.20 Update github actions. --- .github/workflows/test.yml | 30 +++++++++++------------------- go.mod | 2 +- 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 67528f6..2786038 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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: @@ -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: @@ -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: | @@ -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 @@ -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: @@ -100,8 +98,6 @@ 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: @@ -109,10 +105,9 @@ jobs: 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 @@ -227,7 +222,7 @@ jobs: - name: "Check: go mod tidy doesn't modify files" if: always() run: | - go mod tidy -compat=1.17 + go mod tidy TOUCHED=$(git status --porcelain --ignored) if ! test -z "$TOUCHED"; then echo "go mod tidy was not clean, please update:" @@ -276,23 +271,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: diff --git a/go.mod b/go.mod index 36cd2b8..68dfd1f 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ module periph.io/x/devices/v3 -go 1.17 +go 1.20 require ( github.com/google/go-cmp v0.5.9