Skip to content

Commit

Permalink
gha: Use setup-node (#58)
Browse files Browse the repository at this point in the history
* config: Add .nvmrc
* gha: Add setup-node step
* gha: Add step to read .nvmrc

Close #55
  • Loading branch information
peaceiris committed Oct 8, 2019
1 parent 839eb27 commit 3e55082
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
12.11.1

0 comments on commit 3e55082

Please sign in to comment.