Skip to content

Commit

Permalink
chore!: remove coveralls jobs from workflows (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs authored Jan 12, 2022
1 parent 92f2b49 commit df77472
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 123 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/plugins-ci-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,11 @@ name: Plugin CI - MySQL

on:
workflow_call:
inputs:
generate-coverage:
description: 'Set to true to generate coverage and send to Coveralls.'
required: false
type: boolean

jobs:
test:
runs-on: ${{ matrix.os }}

# output.COVERALLS is a variable to determine whether we should post to coveralls when all parallel test finish
outputs:
COVERALLS: ${{ steps.coveralls-trigger.outputs.COVERALLS_TRIGGER }}

strategy:
matrix:
node-version: [10, 12, 14, 16]
Expand Down Expand Up @@ -49,35 +40,6 @@ jobs:
- name: Run Tests
run: npm test

- name: Coveralls Parallel
id: coveralls-parallel
if: inputs.generate-coverage == true
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
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: inputs.generate-coverage == true && 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: inputs.generate-coverage == true && needs.test.outputs.COVERALLS != 'failure'
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true

automerge:
needs: test
permissions:
Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/plugins-ci-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,11 @@ name: Plugin CI - PostgreSQL

on:
workflow_call:
inputs:
generate-coverage:
description: 'Set to true to generate coverage and send to Coveralls.'
required: false
type: boolean

jobs:
test:
runs-on: ${{ matrix.os }}

# output.COVERALLS is a variable to determine whether we should post to coveralls when all parallel test finish
outputs:
COVERALLS: ${{ steps.coveralls-trigger.outputs.COVERALLS_TRIGGER }}

strategy:
matrix:
node-version: [10, 12, 14, 16]
Expand Down Expand Up @@ -60,35 +51,6 @@ jobs:
- name: Run Tests
run: npm test

- name: Coveralls Parallel
id: coveralls-parallel
if: inputs.generate-coverage == true
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
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: inputs.generate-coverage == true && 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: inputs.generate-coverage == true && needs.test.outputs.COVERALLS != 'failure'
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true

automerge:
needs: test
permissions:
Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/plugins-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,11 @@ name: Plugin CI

on:
workflow_call:
inputs:
generate-coverage:
description: 'Set to true to generate coverage and send to Coveralls.'
required: false
type: boolean

jobs:
test:
runs-on: ${{ matrix.os }}

# output.COVERALLS is a variable to determine whether we should post to coveralls when all parallel test finish
outputs:
COVERALLS: ${{ steps.coveralls-trigger.outputs.COVERALLS_TRIGGER }}

strategy:
matrix:
node-version: [10, 12, 14, 16]
Expand All @@ -35,35 +26,6 @@ jobs:
- name: Run Tests
run: npm test

- name: Coveralls Parallel
id: coveralls-parallel
if: inputs.generate-coverage == true
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
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: inputs.generate-coverage == true && 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: inputs.generate-coverage == true && needs.test.outputs.COVERALLS != 'failure'
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true

automerge:
needs: test
permissions:
Expand Down
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,11 @@ on:

jobs:
call-reuseable-workflow:
uses: fastify/workflows/.github/workflows/plugins-ci.yml@v1
with:
generate-coverage: true
uses: fastify/workflows/.github/workflows/plugins-ci.yml@v2
```
Included in this repo is a [basic workflow](.github/workflows/plugins-ci.yml) for use across the majority of plugins, as well as variants with service containers.
## Inputs
| Input Name | Required | Type | Default | Description |
| ------------------- | -------- | ------- | ------- | --------------------------------------------------------- |
| `generate-coverage` | false | boolean | `false` | Set to `true` to generate coverage and send to Coveralls. |

## Acknowledgements
This project is kindly sponsored by:
Expand Down

0 comments on commit df77472

Please sign in to comment.