Skip to content

Commit

Permalink
Require 100% code coverage. Remove coveralls. (#790)
Browse files Browse the repository at this point in the history
* Require 100% code coverage. Remove coveralls.

* Do not skip pretty tests on windows
  • Loading branch information
mcollina authored Mar 17, 2020
1 parent 0420712 commit 104b789
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 31 deletions.
23 changes: 3 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: CI
on: [push, pull_request]
jobs:
build:
test:
name: ${{ matrix.node-version }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -10,29 +10,12 @@ jobs:
os: [macOS-latest, windows-latest, ubuntu-latest]
node-version: [10, 12, 13]
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: npm i
- name: Tests
run: npm run test
coverage:
name: coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js 12
uses: actions/setup-node@v1
with:
node-version: 12
- name: Install
run: npm i
- name: run with coverage
run: npm run cov-ci
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
run: npm test
1 change: 1 addition & 0 deletions .taprc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
esm: false
ts: false
jsx: false
coverage: true
timeout: 480
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ There are a few basic ground-rules for contributors:
1. **External API changes and significant modifications** ought to be subject to an **internal pull-request** to solicit feedback from other contributors.
1. Internal pull-requests to solicit feedback are *encouraged* for any other non-trivial contribution but left to the discretion of the contributor.
1. Contributors should attempt to adhere to the prevailing code-style.
1. 100% code coverage

## Releases

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

# pino
[![Build Status](https://img.shields.io/github/workflow/status/pinojs/pino/CI)](https://github.com/pinojs/pino/actions)
 [![Coverage Status](https://img.shields.io/coveralls/github/pinojs/pino)](https://coveralls.io/github/pinojs/pino?branch=master)
 [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)
 [![TypeScript definitions on DefinitelyTyped](https://img.shields.io/badge/DefinitelyTyped-.d.ts-brightgreen.svg?style=flat)](https://definitelytyped.org)

Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
"scripts": {
"docs": "docsify serve",
"browser-test": "airtap --local 8080 test/browser*test.js",
"test": "standard | snazzy && tap --no-cov test/*test.js",
"ci": "standard | snazzy && tap --100 test/*test.js",
"cov-ci": "tap --100 --coverage-report=lcov test/*test.js",
"test": "standard | snazzy && tap --100 test/*test.js",
"cov-ui": "tap --coverage-report=html test/*test.js",
"bench": "node benchmarks/utils/runbench all",
"bench-basic": "node benchmarks/utils/runbench basic",
Expand Down
7 changes: 0 additions & 7 deletions test/pretty.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,8 @@ const execa = require('execa')
const writer = require('flush-write-stream')
const { once } = require('./helper')
const pino = require('../')
const tap = require('tap')
const strip = require('strip-ansi')

const isWin = process.platform === 'win32'
if (isWin) {
tap.comment('Skipping pretty printing tests on Windows as colour codes are different and tests fail')
process.exit(0)
}

test('can be enabled via exported pino function', async ({ isNot }) => {
var actual = ''
const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'basic.js')])
Expand Down

0 comments on commit 104b789

Please sign in to comment.