Skip to content

Commit

Permalink
Merge pull request #75 from sawadashota/enable_cache
Browse files Browse the repository at this point in the history
Enable cache golangci-lint result, go build and dependencies
  • Loading branch information
shogo82148 committed Apr 29, 2021
2 parents c9fac88 + c8c1f7b commit 1a9437c
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,38 @@ jobs:
golangci_lint_flags: "--disable-all -E errcheck"
tool_name: errcheck
level: info

# Enable cache of golangci-lint result, go build and go dependencies
with_cache:
name: runner / errcheck
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v1

- uses: actions/cache@v2
with:
path: ~/.cache/golangci-lint
key: ${{ runner.os }}-golangcilint-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-golangci-lint-
- uses: actions/cache@v2
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-gobuild-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-gobuild-
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v1
```

### All-in-one golangci-lint configuration without config file
Expand Down

0 comments on commit 1a9437c

Please sign in to comment.