Fixing lint warning and simplifying code. #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Lint and Test' | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
- github_actions | |
- support_node16 | |
pull_request: | |
jobs: | |
lint-test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
nodejs_version: [ 12, 14, 16, 18 ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.nodejs_version }} | |
- run: node --version && npm --version | |
- run: npm install | |
- run: npm run lint | |
- run: npm run test | |
# Requires setting up Coveralls access token | |
# - run: npm run check-coverage && (cat ./coverage/lcov.info | ./node_modules/.bin/coveralls) |