chore: fix github action cache.

This commit is contained in:
Fernandez Ludovic
2021-07-17 05:58:35 +02:00
parent 9baca36b2c
commit 09cbe40f67
3 changed files with 18 additions and 10 deletions

View File

@ -11,7 +11,7 @@ jobs:
strategy: strategy:
matrix: matrix:
go-version: [ 1.14, 1.15, 1.x ] go-version: [ 1.15, 1.16, 1.x ]
os: [ubuntu-latest, macos-latest, windows-latest] os: [ubuntu-latest, macos-latest, windows-latest]
steps: steps:
@ -29,11 +29,16 @@ jobs:
- name: Cache Go modules - name: Cache Go modules
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
# In order:
# * Module download cache
# * Build cache (Linux)
# * Build cache (Mac)
# * Build cache (Windows)
path: | path: |
~/go/pkg/mod # Module download cache ~/go/pkg/mod
~/.cache/go-build # Build cache (Linux) ~/.cache/go-build
~/Library/Caches/go-build # Build cache (Mac) ~/Library/Caches/go-build
'%LocalAppData%\go-build' # Build cache (Windows) %LocalAppData%\go-build
key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }} key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: | restore-keys: |
${{ runner.os }}-${{ matrix.go-version }}-go- ${{ runner.os }}-${{ matrix.go-version }}-go-

View File

@ -14,9 +14,9 @@ jobs:
name: Main Process name: Main Process
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
GO_VERSION: 1.15 GO_VERSION: 1.16
GOLANGCI_LINT_VERSION: v1.33.0 GOLANGCI_LINT_VERSION: v1.41.1
SEIHON_VERSION: v0.5.1 SEIHON_VERSION: v0.8.3
CGO_ENABLED: 0 CGO_ENABLED: 0
steps: steps:
@ -47,7 +47,6 @@ jobs:
go mod tidy go mod tidy
git diff --exit-code go.mod git diff --exit-code go.mod
git diff --exit-code go.sum git diff --exit-code go.sum
go mod download
# https://golangci-lint.run/usage/install#other-ci # https://golangci-lint.run/usage/install#other-ci
- name: Install golangci-lint ${{ env.GOLANGCI_LINT_VERSION }} - name: Install golangci-lint ${{ env.GOLANGCI_LINT_VERSION }}

View File

@ -23,7 +23,10 @@
[linters] [linters]
enable-all = true enable-all = true
disable = [ disable = [
"maligned", "golint", # deprecated
"scopelint", # deprecated
"interfacer", # deprecated
"maligned", # deprecated
"lll", "lll",
"gosec", "gosec",
"dupl", "dupl",
@ -40,6 +43,7 @@
"wrapcheck", "wrapcheck",
"exhaustive", "exhaustive",
"exhaustivestruct", "exhaustivestruct",
"forbidigo",
] ]
[issues] [issues]