Skip to content

Commit

Permalink
Cache go modules/bins for faster builds (#756)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellistarn authored Oct 21, 2021
1 parent 5af2396 commit 2596e16
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,27 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup Go
uses: actions/setup-go@v2
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.17

- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
~/go/bin/
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: CI - Verifications and Tests
run: |
make toolchain
echo "/usr/local/kubebuilder/bin" >> $GITHUB_PATH
make ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Code Coverage
uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage.html

0 comments on commit 2596e16

Please sign in to comment.