Skip to content

Commit

Permalink
feat(ci): install nodejs version according to nvmrc (#580)
Browse files Browse the repository at this point in the history
  • Loading branch information
aslafy-z committed May 2, 2020
1 parent cd91b9b commit fab0a4e
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,36 @@ on:
branches:
- master
pull_request: {}

jobs:
unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Unit Tests
run: |
npm ci
npm run test

- 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 }}
- run: npm ci

- run: npm run test

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Lint
run: |
npm ci
npm run lint

- 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 }}
- run: npm ci

- run: npm run lint

0 comments on commit fab0a4e

Please sign in to comment.