Skip to content

Commit

Permalink
CI : Add GitHub action (#743)
Browse files Browse the repository at this point in the history
* add github action

* add install step

* lint

* adding node 12 & 13

* add OS

* add latest tags

* skip coverage check for window

* fix

* fix for node13
  • Loading branch information
zekth authored and mcollina committed Nov 18, 2019
1 parent 919f5ad commit edaedec
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI
on: [push, pull_request]
jobs:
build:
name: ${{ matrix.node-version }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macOS-latest, windows-latest, ubuntu-latest]
node-version: [6, 8, 10, 11, 12, 13]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: npm i
- name: run with coverage
if: (!startsWith(matrix.os, 'windows'))
run: npm run ci
# Windows just pass the test without checking the Coverage
# Due to skipped tests
- name: run without coverage
if: startsWith(matrix.os, 'windows')
run: npm run test
4 changes: 2 additions & 2 deletions test/http.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ test('http request support via serializer', async ({ ok, same, error, teardown }
server.close()
})

test('http request support via serializer without request connection', async ({ ok, same, error, teardown }) => {
test('http request support via serializer without request connection', async ({ ok, isLike, error, teardown }) => {
var originalReq
const instance = pino({
serializers: {
Expand All @@ -93,7 +93,7 @@ test('http request support via serializer without request connection', async ({
}, sink((chunk, enc) => {
ok(new Date(chunk.time) <= new Date(), 'time is greater than Date.now()')
delete chunk.time
same(chunk, {
isLike(chunk, {
pid: pid,
hostname: hostname,
level: 30,
Expand Down

0 comments on commit edaedec

Please sign in to comment.