| 1 |
name: golangci-lint |
| 2 |
on: |
| 3 |
push: |
| 4 |
tags: |
| 5 |
- v* |
| 6 |
branches: |
| 7 |
- master |
| 8 |
- main |
| 9 |
pull_request: |
| 10 |
jobs: |
| 11 |
golangci: |
| 12 |
name: lint |
| 13 |
runs-on: ubuntu-latest |
| 14 |
steps: |
| 15 |
- uses: actions/checkout@v2 |
| 16 |
- name: Cache-Go |
| 17 |
uses: actions/cache@v1 |
| 18 |
with: |
| 19 |
path: | |
| 20 |
~/go/pkg/mod # Module download cache |
| 21 |
~/.cache/go-build # Build cache (Linux) |
| 22 |
~/Library/Caches/go-build # Build cache (Mac) |
| 23 |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} |
| 24 |
restore-keys: | |
| 25 |
${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} |
| 26 |
- name: golangci-lint |
| 27 |
uses: golangci/golangci-lint-action@v2 |
| 28 |
with: |
| 29 |
version: latest |