Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use go action cache #124

Merged
merged 2 commits into from Jan 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 5 additions & 15 deletions .github/workflows/go.yml
Expand Up @@ -12,28 +12,18 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: ^1.19
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'

# https://github.com/mvdan/github-actions-golang
- uses: actions/cache@v3
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
go-version: ^1.19
cache: true
id: go

- uses: dotnet/nbgv@master
with:
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/golangci-lint.yml
Expand Up @@ -15,17 +15,18 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: ^1.19

- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'

- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: ^1.19
cache: true

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
Expand Down