Skip to content

Commit

Permalink
ci: add coveralls
Browse files Browse the repository at this point in the history
Add Coveralls to CI script
  • Loading branch information
jessie-codes committed Sep 12, 2020
1 parent 44bf77b commit d36f1b0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
name: Test & Lint
# This workflow is triggered on pushes to the repository.
on: [push]
on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-16.04
strategy:
matrix:
node: [ '10', '12' ]
node: [ '12' ]
name: Node ${{ matrix.node }}
steps:
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: npm ci
- run: npm test
- run: npm run lint
- name: Test
env:
COVERALLS_SERVICE_NAME: GitHub Actions CI
COVERALLS_GIT_BRANCH: ${{ steps.extract_branch.outputs.branch }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
npm ci
npm test
npm run lint
npm run coverage
5 changes: 3 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Node.js Package
on:
release:
types: [created]
push:
tags:
- v*.*.**
jobs:
build:
runs-on: ubuntu-latest
Expand Down

0 comments on commit d36f1b0

Please sign in to comment.