Add cache to build workflow
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user