Skip to content

Commit

Permalink
ci: Cache golang builds
Browse files Browse the repository at this point in the history
Signed-off-by: AlexNg <[email protected]>
  • Loading branch information
caffeine-addictt committed Oct 3, 2024
1 parent 9923800 commit db1f493
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ jobs:
with:
go-version: stable

- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/.cache/golangci-lint
/go/pkg/mod
key: golint-${{ hashFiles('go.sum') }}
restore-keys: golint

- name: Lint
run: |
set -xe
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ jobs:
with:
go-version: stable

- name: Restore cache
uses: actions/cache/restore@v4
with:
path: |
~/.cache/go-build
/go/pkg/mod
key: go-${{ runner.os }}-${{ hashFiles('go.sum') }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/test-worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@ jobs:
with:
go-version: stable

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

- name: Test
run: |
set -xe
Expand Down

0 comments on commit db1f493

Please sign in to comment.