Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ci): install nodejs version according to nvmrc #580

Merged
merged 6 commits into from
May 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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