Skip to content

Commit

Permalink
chore (ci): add Node.js 17 and run CI linting only once
Browse files Browse the repository at this point in the history
  • Loading branch information
coopflow committed Jan 21, 2022
2 parents 607580f + 68c5272 commit a081576
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 19 deletions.
34 changes: 23 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,31 @@ name: GitHub CI
on: [push, pull_request]

jobs:
linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 16

- name: Install
run: npm install

- name: Lint code
run: npm run lint

test:
needs: linter
runs-on: ${{ matrix.os }}

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10, 12, 14, 16]
node-version: [10, 12, 14, 16, 17]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v2

Expand All @@ -21,20 +37,16 @@ jobs:
node-version: ${{ matrix.node-version }}

- name: Install
run: |
npm install
run: npm install

- name: Run tests & generate coverage
run: |
npm run lint
npm run test:ci
run: npm run test:ci

- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true


coverage:
needs: test
Expand Down
13 changes: 5 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@
"description": "Nodemailer instance initialization and encapsulation in fastify framework",
"main": "plugin.js",
"scripts": {
"coverage": "npm run unit -- --cov --coverage-report=html",
"coveralls": "npm run unit -- --cov",
"lint": "standard --verbose | snazzy",
"lint:fix": "standard --fix --verbose | snazzy",
"test": "npm run lint && npm run unit",
"test:ci": "npm run unit -- --cov --coverage-report=lcov",
"test:report": "npm run lint && npm run unit:report",
"unit": "tap -J test/plugin.test.js",
"unit:report": "tap -J test/plugin.test.js --cov --coverage-report=html --coverage-report=cobertura | tee out.tap",
"unit:verbose": "tap -J test/plugin.test.js -Rspec"
"unit:report": "npm run unit -- --cov --coverage-report=html",
"unit:verbose": "npm run unit -- -Rspec"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -41,11 +38,11 @@
},
"devDependencies": {
"coveralls": "^3.1.1",
"fastify": "^3.24.0",
"nodemailer": "^6.7.1",
"fastify": "^3.27.0",
"nodemailer": "^6.7.2",
"snazzy": "^9.0.0",
"standard": "^16.0.4",
"tap": "^15.1.2"
"tap": "^15.1.6"
},
"peerDependencies": {
"nodemailer": ">=6.0.0"
Expand Down

0 comments on commit a081576

Please sign in to comment.