gha: Add step to read .nvmrc
This commit is contained in:
parent
0f4dcf161b
commit
400dbc5555
1 changed files with 8 additions and 3 deletions
11
.github/workflows/test.yml
vendored
11
.github/workflows/test.yml
vendored
|
|
@ -16,10 +16,14 @@ jobs:
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- name: setup node
|
- name: Read .nvmrc
|
||||||
|
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
|
||||||
|
id: nvm
|
||||||
|
|
||||||
|
- name: Setup node
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: '12.x'
|
node-version: '${{ steps.nvm.outputs.NVMRC }}'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|
@ -33,7 +37,8 @@ jobs:
|
||||||
- name: Test
|
- name: Test
|
||||||
run: npm test
|
run: npm test
|
||||||
|
|
||||||
- uses: actions/upload-artifact@master
|
- name: Upload test coverage
|
||||||
|
uses: actions/upload-artifact@master
|
||||||
with:
|
with:
|
||||||
name: coverage
|
name: coverage
|
||||||
path: coverage
|
path: coverage
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue