Skip to content

Commit

Permalink
ci: fix coveralls reporting (#44)
Browse files Browse the repository at this point in the history
* ci: fix coveralls reporting

* ci: ensure report runs after build
  • Loading branch information
iamogbz committed Sep 22, 2020
1 parent 946a91a commit 0bb634b
Showing 1 changed file with 45 additions and 36 deletions.
81 changes: 45 additions & 36 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,45 +8,54 @@ on:

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x]
steps:
- uses: actions/checkout@v1
- name: Setup
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: |
npm install
- name: Lint
run: |
npm run lint
- name: Test
env:
CI: true
run: |
npm test -- --ci --coverage
- name: Build
run: |
npm run build
- name: Integration
run: |
npm run e2e
- name: Deploy
if: matrix.node-version == '12.x' && github.ref == 'refs/heads/master'
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm run release
- name: Report
uses: coverallsapp/github-action@master
with:
flag-name: run-${{ matrix.node-version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: './artifacts/coverage/lcov.info'
parallel: true

report:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: |
npm install
- name: Lint
run: |
npm run lint
- name: Test
env:
CI: true
run: |
npm test -- --ci --coverage
- name: Build
run: |
npm run build
- name: Integration
run: |
npm run e2e
- name: Deploy
if: matrix.node-version == '12.x' && github.ref == 'refs/heads/master'
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm run release
- name: Report
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: "./artifacts/coverage/lcov.info"
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true

0 comments on commit 0bb634b

Please sign in to comment.