Add cache to build workflow
This commit is contained in:
parent
d534cb96a9
commit
b8a3af090d
1 changed files with 24 additions and 7 deletions
17
.github/workflows/build.yml
vendored
17
.github/workflows/build.yml
vendored
|
|
@ -20,7 +20,16 @@ jobs:
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
|
- uses: actions/cache@v1
|
||||||
|
id: cache-go
|
||||||
|
with:
|
||||||
|
path: ~/go/pkg/mod
|
||||||
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-go-
|
||||||
|
|
||||||
- name: Download dependencies
|
- name: Download dependencies
|
||||||
|
if: steps.cache-go.outputs.cache-hit != 'true'
|
||||||
run: go mod download
|
run: go mod download
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
|
|
@ -36,6 +45,14 @@ jobs:
|
||||||
with:
|
with:
|
||||||
node-version: 13
|
node-version: 13
|
||||||
|
|
||||||
|
- uses: actions/cache@v1
|
||||||
|
id: cache-npm
|
||||||
|
with:
|
||||||
|
path: ~/.npm
|
||||||
|
key: ${{ runner.os }}-node-${{ hashFiles('ui/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-node-
|
||||||
|
|
||||||
- name: npm install dependencies
|
- name: npm install dependencies
|
||||||
run: |
|
run: |
|
||||||
cd ui
|
cd ui
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue