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:
Shohei Ueda 2019-10-09 00:20:05 +09:00 committed by GitHub
parent 839eb279b0
commit 3e55082b3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 2 deletions

View File

@ -16,8 +16,17 @@ jobs:
with:
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
run: npm ci
run: npm install
- name: Format check
run: npm run format:check
@ -28,7 +37,8 @@ jobs:
- name: Test
run: npm test
- uses: actions/upload-artifact@master
- name: Upload test coverage
uses: actions/upload-artifact@master
with:
name: coverage
path: coverage

1
.nvmrc Normal file
View File

@ -0,0 +1 @@
12.11.1