Skip to content

Commit

Permalink
chore: enable coveralls flow
Browse files Browse the repository at this point in the history
  • Loading branch information
helio-frota committed Aug 3, 2021
1 parent 8d60ef0 commit 9872aeb
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 25 deletions.
38 changes: 16 additions & 22 deletions .github/workflows/nodejs-ci-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,19 @@ jobs:
- run: npm ci
- run: npm test
- run: npx @pkgjs/support validate
# ==================================================
# Uncomment this part to run coverall.
# ==================================================
# - run: node_modules/nyc/bin/nyc.js report --reporter=lcovonly
# - name: Coveralls Parallel
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.github_token }}
# flag-name: run-${{ matrix.node-version }}
# parallel: true
# ==================================================
# Uncomment this part to publish coverall results.
# ==================================================
# finish:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - name: Coveralls Finished
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.github_token }}
# parallel-finished: true
- run: node_modules/nyc/bin/nyc.js report --reporter=lcovonly
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.node-version }}
parallel: true
finish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# New Module Starter
![Node.js CI](https://github.com/nodeshift/new-module-starter/workflows/Node.js%20CI/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/nodeshift/new-module-starter/badge.svg?branch=main)](https://coveralls.io/github/nodeshift/new-module-starter?branch=main)

This repo is for reference when creating a new node module/application in the nodeshift org.

Expand Down
7 changes: 7 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
function foo() {
return 'bar';
}

module.exports = {
foo
}
7 changes: 4 additions & 3 deletions test/test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/* eslint-disable no-undef */
const main = require('../main.js');
const assert = require('assert');

describe('Dummy', () => {
it('test', () => {
assert.strictEqual(1, 1);
describe('It should', () => {
it('bar', () => {
assert.strictEqual(main.foo(), 'bar');
});
});

0 comments on commit 9872aeb

Please sign in to comment.