ci: add yarn caching (#2866)
This commit is contained in:
parent
3ec21d0642
commit
97af0f8a86
28
.github/workflows/nodejs.yml
vendored
28
.github/workflows/nodejs.yml
vendored
@ -24,12 +24,18 @@ jobs:
|
|||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
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
|
- name: npm install, unit test and build
|
||||||
run: |
|
run: |
|
||||||
node --version
|
node --version
|
||||||
npm --version
|
npm --version
|
||||||
yarn --version
|
yarn --version
|
||||||
yarn
|
yarn --frozen-lockfile
|
||||||
yarn bootstrap
|
yarn bootstrap
|
||||||
yarn test:ci
|
yarn test:ci
|
||||||
yarn build:demo
|
yarn build:demo
|
||||||
@ -57,6 +63,12 @@ jobs:
|
|||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 10.x
|
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
|
- uses: actions/download-artifact@master
|
||||||
with:
|
with:
|
||||||
name: dev-test-website-node-10.x
|
name: dev-test-website-node-10.x
|
||||||
@ -66,13 +78,13 @@ jobs:
|
|||||||
node --version
|
node --version
|
||||||
npm --version
|
npm --version
|
||||||
yarn --version
|
yarn --version
|
||||||
yarn
|
yarn --frozen-lockfile
|
||||||
yarn test:e2e:run-ci
|
yarn test:e2e:run-ci
|
||||||
env:
|
env:
|
||||||
CI: true
|
CI: true
|
||||||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
||||||
NODE_OPTIONS: --max-old-space-size=4096
|
NODE_OPTIONS: --max-old-space-size=4096
|
||||||
|
|
||||||
# forked workflow (no acceess to build secrets)
|
# forked workflow (no acceess to build secrets)
|
||||||
e2e-no-cypress-record:
|
e2e-no-cypress-record:
|
||||||
needs: build
|
needs: build
|
||||||
@ -85,6 +97,12 @@ jobs:
|
|||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 10.x
|
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
|
- uses: actions/download-artifact@master
|
||||||
with:
|
with:
|
||||||
name: dev-test-website-node-10.x
|
name: dev-test-website-node-10.x
|
||||||
@ -94,8 +112,8 @@ jobs:
|
|||||||
node --version
|
node --version
|
||||||
npm --version
|
npm --version
|
||||||
yarn --version
|
yarn --version
|
||||||
yarn
|
yarn --frozen-lockfile
|
||||||
yarn test:e2e:run
|
yarn test:e2e:run
|
||||||
env:
|
env:
|
||||||
CI: true
|
CI: true
|
||||||
NODE_OPTIONS: --max-old-space-size=4096
|
NODE_OPTIONS: --max-old-space-size=4096
|
||||||
|
Loading…
x
Reference in New Issue
Block a user