Skip to content

Commit

Permalink
Replace Travis workflow with GitHub action (#140)
Browse files Browse the repository at this point in the history
* Replace Travis workflow with GitHub action

This keeps the existing matrix intact, but also adds node 14 as the current LTS.

* Use coveralls GitHub action

* Update README badge
  • Loading branch information
lauraseidler authored Sep 29, 2021
1 parent b09a3c2 commit fb70517
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 20 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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: tests

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

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node: [10, 12, 14]
hapi: ["@hapi/hapi@18", "@hapi/hapi@19", "@hapi/hapi@20"]
exclude:
- node: 10
hapi: "@hapi/hapi@19"
- node: 10
hapi: "@hapi/hapi@20"

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npm install ${{ matrix.hapi }}
- run: npm run coverage:lcov
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run-${{ matrix.node }}-${{ matrix.hapi }}
parallel: true

finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# hapi-pino  [![Build Status](https://travis-ci.org/pinojs/hapi-pino.svg)](https://travis-ci.org/pinojs/hapi-pino) [![Coverage Status](https://coveralls.io/repos/github/pinojs/hapi-pino/badge.svg?branch=master)](https://coveralls.io/github/pinojs/hapi-pino?branch=master)
# hapi-pino  ![Tests Status](https://github.com/pinojs/hapi-pino/actions/workflows/test.yml/badge.svg) [![Coverage Status](https://coveralls.io/repos/github/pinojs/hapi-pino/badge.svg?branch=master)](https://coveralls.io/github/pinojs/hapi-pino?branch=master)


[Hapi](http://hapijs.com) plugin for the [Pino](https://github.com/pinojs/pino) logger. It logs in JSON for easy
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "index.js",
"scripts": {
"coverage": "lab test.js -c",
"coverage:lcov": "lab test.js -r lcov -o coverage/lcov.info",
"coveralls": "lab test.js -r lcov | coveralls",
"test": "standard && lab --timeout 100000 test.js"
},
Expand Down

0 comments on commit fb70517

Please sign in to comment.