Skip to content

Commit

Permalink
update dependencies and CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mborne committed Sep 28, 2022
1 parent 72e18b0 commit f6ea35f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 14 deletions.
29 changes: 18 additions & 11 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ master ]
branches: [ "master" ]
pull_request:
branches: [ master ]
branches: [ "master" ]

jobs:
build:
Expand All @@ -16,14 +13,24 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [14.x, 16.x, 18.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
# cache: 'npm'
- run: npm install
- run: npm test
#cache: 'npm'

- name: Install dependencies
run: npm install

- name: Run tests
run: npm test

- name: Publish coverage to coveralls.io
run: npm run coveralls
if: github.ref == 'refs/heads/master' && matrix.node-version == '16.x'
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/node_modules/
/package-lock.json

/.nyc_output
/coverage/
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "Helper based on wget to download files",
"main": "index.js",
"scripts": {
"test": "mocha --reporter spec"
"test": "nyc --reporter=html --reporter=text --reporter=cobertura mocha",
"coveralls": "nyc report --reporter=text-lcov | coveralls"
},
"repository": {
"type": "git",
Expand All @@ -24,8 +25,11 @@
},
"homepage": "https://github.com/mborne/node-dl#readme",
"devDependencies": {
"chai": "^4.2.0",
"mocha": "^6.1.4"
"chai": "^4.3.6",
"coveralls": "^3.1.1",
"mocha": "^10.0.0",
"mocha-lcov-reporter": "^1.3.0",
"nyc": "^15.1.0"
},
"directories": {
"test": "test"
Expand Down

0 comments on commit f6ea35f

Please sign in to comment.