Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
Add dependency caching to speed up workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
font committed Jun 23, 2021
1 parent e07c0a7 commit 2b01bea
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@ jobs:
path: gatekeeper-operator
fetch-depth: 0 # Fetch all history for all tags and branches

# https://github.com/mvdan/github-actions-golang#how-do-i-set-up-caching-between-builds
- uses: actions/cache@v2
with:
# In order:
# * Module download cache
# * Build cache (Linux)
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: actions/setup-go@v2
with:
go-version: '1.15.13'
Expand Down Expand Up @@ -90,6 +103,19 @@ jobs:
with:
go-version: '1.15.13'

# https://github.com/mvdan/github-actions-golang#how-do-i-set-up-caching-between-builds
- uses: actions/cache@v2
with:
# In order:
# * Module download cache
# * Build cache (Linux)
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Unit and Integration Tests
run: make test

Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/olm_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ on:

jobs:
main:
runs-on: ubuntu-20.04
name: Run tests
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
with:
Expand All @@ -19,6 +20,19 @@ jobs:
with:
go-version: '1.15.13'

# https://github.com/mvdan/github-actions-golang#how-do-i-set-up-caching-between-builds
- uses: actions/cache@v2
with:
# In order:
# * Module download cache
# * Build cache (Linux)
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Verify bundle
run: |
make bundle
Expand Down

0 comments on commit 2b01bea

Please sign in to comment.