Skip to content

Commit

Permalink
Add cache step.
Browse files Browse the repository at this point in the history
  • Loading branch information
googollee committed Jul 29, 2024
1 parent b5be194 commit 9da2eff
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,24 @@ jobs:
go:
- '1.22'
steps:
- uses: actions/checkout@v4
- name: Checkout the repo
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '${{ matrix.go }}'
check-latest: true

- name: Cache modules
uses: actions/cache@v4
with:
path: |
~/go/pkg
key: ${{ runner.os }}-go-${{ hashFiles('**/go.mod', '**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build
run: go build -v ./...

Expand Down

0 comments on commit 9da2eff

Please sign in to comment.