Skip to content

Commit

Permalink
chore: 升级 github action 使用的 node 版本
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyadam committed Jul 9, 2020
1 parent cf0a444 commit 0fff737
Showing 1 changed file with 32 additions and 8 deletions.
40 changes: 32 additions & 8 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,43 @@ jobs:

strategy:
matrix:
node-version: [8.x, 10.x, 12.x]
node-version: [12.x, 13.x, 14.x]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
npm install
npm run bootstrap
npm run build
npm test
# - name: restore lerna
# uses: actions/cache@v2
# with:
# path: |
# node_modules
# */*/node_modules
# key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: npm install -g yarn
- run: yarn config set registry https://registry.yarnpkg.com
- name: install
run: yarn
- name: bootstrap
run: yarn run bootstrap:lerna
- name: lint
run: yarn run lint
- name: build
run: yarn run build:parallel
- name: test
run: yarn test
env:
CI: true

0 comments on commit 0fff737

Please sign in to comment.