Skip to content

CI with Coveralls #3328

@climba03003

Description

@climba03003

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the feature has not already been requested

🚀 Feature Proposal

Make use of continue-on-error to prevent future impact on coveralls maintenance.
The tools like coveralls should never be the blocker for CI.

It should be applied to the repo that using coveralls inside the organization.

Motivation

Coveralls Maintenance.
https://status.coveralls.io/incidents/ppvnbpd172gy
https://status.coveralls.io/incidents/8zbjrwpb4frv

Example

I have update this repo in below and it should be the example of other repo.

jobs:
test:
runs-on: ${{ matrix.os }}
outputs:
COVERALLS: ${{ steps.coveralls-trigger.outputs.COVERALLS_TRIGGER }}
strategy:
matrix:
node-version: [10, 12, 14, 16]
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2.3.4
- name: Use Node.js
uses: actions/setup-node@v2.1.5
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: |
npm install --ignore-scripts
- name: Check licenses
run: |
npm run license-checker
- name: Run tests
run: |
npm run test:ci
- name: Coveralls Parallel
id: coveralls-parallel
continue-on-error: true
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel: true
flag-name: run-${{ matrix.node-version }}-${{ matrix.os }}
- name: Should Trigger coverallsapp/github-action@master
id: coveralls-trigger
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#steps-context
# when continue-on-error failed, outcome is failure and conclusion is success
if: steps.coveralls-parallel.conclusion == 'success' && steps.coveralls-parallel.outcome != 'success'
run: |
echo "::set-output name=COVERALLS_TRIGGER::failure"
coverage:
needs: test
runs-on: ubuntu-latest
if: needs.test.outputs.COVERALLS != 'failure'
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true

It will allow the stage of coverall to fail and skip the collection stage if any of the coveralls step inside test fail.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions