Skip to content

Commit

Permalink
Merge e18c1dc into 5310b75
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-fox committed Jan 11, 2022
2 parents 5310b75 + e18c1dc commit c1b47cb
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 2 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI
'on':
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
unit-test:
name: Unit Tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 12.x
- 14.x
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: 'Install Node.js ${{ matrix.node-version }}'
uses: actions/setup-node@v1
with:
node-version: '${{ matrix.node-version }}'
- name: 'Unit Tests with Node.js ${{ matrix.node-version }}'
run: |
rm package-lock.json
npm install
npm test
code-coverage:
name: Coveralls Code Coverage
runs-on: ubuntu-latest
needs: unit-test
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: 'Test Coverage with Node.js 12.x'
uses: actions/setup-node@v1
with:
node-version: 12.x
- run: |
rm package-lock.json
npm install
npm run test:coverage
- name: Push to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Really simple and performant JSON logger for node.js.

[![npm version](https://img.shields.io/npm/v/logops.svg)](http://badge.fury.io/js/logops)
[![Build Status](https://img.shields.io/travis/telefonicaid/logops.svg)](https://travis-ci.org/telefonicaid/logops)
[![CI](https://github.com/telefonicaid/logops/workflows/CI/badge.svg)](https://github.com/telefonicaid/logops/actions?query=workflow%3ACI)
[![Coveralls branch](https://img.shields.io/coveralls/telefonicaid/logops/master.svg)](https://coveralls.io/r/telefonicaid/logops?branch=master)
[![Dependency Status](https://img.shields.io/gemnasium/telefonicaid/logops.svg)](https://gemnasium.com/telefonicaid/logops)
![Typescript definitions](https://img.shields.io/badge/TypeScript%20Definition-.d.ts-blue.svg)
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"node": ">=6"
},
"scripts": {
"coverage": "nyc report --reporter=text-lcov | coveralls",
"test:coverage": "nyc --reporter=lcov mocha -- -R spec test/environment.js 'test/**/*.spec.js' --reporter spec --exit",
"test:coveralls": "npm run test:coverage && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage",
"lint": "eslint lib && tslint './{lib,test}/**/*.ts'",
"test": "nyc mocha -R spec test/environment.js 'test/**/*.spec.js' && npm run test:ts",
"test:ts": "tsc --noEmit"
Expand Down

0 comments on commit c1b47cb

Please sign in to comment.