ci: add yarn caching (#2866)

This commit is contained in:
Erez Rokah 2019-11-11 11:19:47 +02:00 committed by GitHub
parent 3ec21d0642
commit 97af0f8a86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,12 +24,18 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v1
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
restore-keys: |
${{ runner.os }}-yarn-
- name: npm install, unit test and build
run: |
node --version
npm --version
yarn --version
yarn
yarn --frozen-lockfile
yarn bootstrap
yarn test:ci
yarn build:demo
@ -57,6 +63,12 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: 10.x
- uses: actions/cache@v1
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/download-artifact@master
with:
name: dev-test-website-node-10.x
@ -66,7 +78,7 @@ jobs:
node --version
npm --version
yarn --version
yarn
yarn --frozen-lockfile
yarn test:e2e:run-ci
env:
CI: true
@ -85,6 +97,12 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: 10.x
- uses: actions/cache@v1
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/download-artifact@master
with:
name: dev-test-website-node-10.x
@ -94,7 +112,7 @@ jobs:
node --version
npm --version
yarn --version
yarn
yarn --frozen-lockfile
yarn test:e2e:run
env:
CI: true