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: 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
View file

@ -0,0 +1 @@
12.11.1