ci: support mutiple node versions
This commit is contained in:
parent
7a2182d752
commit
2617fd0823
19
.github/workflows/nodejs.yml
vendored
19
.github/workflows/nodejs.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: Node CI
|
name: CI
|
||||||
|
|
||||||
# Triggers the workflow on push or pull request events but only for the master branch
|
# Triggers the workflow on push or pull request events but only for the master branch
|
||||||
on:
|
on:
|
||||||
@ -17,6 +17,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
- name: cache yarn.lock
|
- name: cache yarn.lock
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@ -49,7 +54,12 @@ jobs:
|
|||||||
needs: [setup]
|
needs: [setup]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
- name: Restore cache from yarn.lock
|
- name: Restore cache from yarn.lock
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -72,6 +82,11 @@ jobs:
|
|||||||
needs: [setup]
|
needs: [setup]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
- name: Restore cache from yarn.lock
|
- name: Restore cache from yarn.lock
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
|
Loading…
Reference in New Issue
Block a user