Skip to content

Commit

Permalink
Improve build speeds by caching
Browse files Browse the repository at this point in the history
  • Loading branch information
jurisevo committed Jun 13, 2022
1 parent 5251d8a commit 3bdd952
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,24 @@ jobs:
with:
go-version-file: 'go.mod'

- name: Save Go cache paths
id: go-cache-paths
run: |
echo "::set-output name=go_mod_cache::$(go env GOMODCACHE)"
echo "::set-output name=go_cache::$(go env GOCACHE)"
- name: Create Go module cache
uses: actions/cache@v3
with:
path: ${{ steps.go-cache-paths.outputs.go_mod_cache }}
key: ${{ runner.os }}-go_mod_cache-${{ hashFiles('go.sum') }}

- name: Create Go cache
uses: actions/cache@v3
with:
path: ${{ steps.go-cache-paths.outputs.go_cache }}
key: ${{ runner.os }}-go_cache-${{ hashFiles('go.sum') }}

- name: Verify module dependencies
run: go mod verify

Expand Down

0 comments on commit 3bdd952

Please sign in to comment.