gha: Use setup-node (#58)
* config: Add .nvmrc * gha: Add setup-node step * gha: Add step to read .nvmrc Close #55
This commit is contained in:
parent
839eb279b0
commit
3e55082b3f
2 changed files with 13 additions and 2 deletions
14
.github/workflows/test.yml
vendored
14
.github/workflows/test.yml
vendored
|
@ -16,8 +16,17 @@ jobs:
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
|
- name: Read .nvmrc
|
||||||
|
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
|
||||||
|
id: nvm
|
||||||
|
|
||||||
|
- name: Setup node
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: '${{ steps.nvm.outputs.NVMRC }}'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm install
|
||||||
|
|
||||||
- name: Format check
|
- name: Format check
|
||||||
run: npm run format:check
|
run: npm run format:check
|
||||||
|
@ -28,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
|
||||||
|
|
1
.nvmrc
Normal file
1
.nvmrc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
12.11.1
|
Loading…
Reference in a new issue