Skip to content

Commit

Permalink
chore: add nodejs CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
targos authored Sep 19, 2021
1 parent 7009811 commit 80a07db
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Node.js CI

on:
push:
branches:
- master
pull_request:

env:
NODE_VERSION: 16.x

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: npm install
- name: Run ESLint
run: npm run eslint
- name: Run Prettier
run: npm run prettier
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Run tests
run: npm run test-coverage
- name: Send coverage report to Codecov
uses: codecov/codecov-action@v2

0 comments on commit 80a07db

Please sign in to comment.