Skip to content

Merge pull request #168 from Methy42/master #8

Merge pull request #168 from Methy42/master

Merge pull request #168 from Methy42/master #8

name: CICD Build / Test / Coverage
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
buildTestCoverage:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: |
npm ci
- name: Lint & Test
run: |
npm run lint
npm run test
- name: Covergae
run: |
npm run coverage
- name: Code Coverage Report
uses: irongut/[email protected]
with:
filename: dist/coverage/cobertura-coverage.xml
badge: true
fail_below_min: true
format: markdown
hide_branch_rate: false
hide_complexity: true
indicators: true
output: both
thresholds: '60 80'
- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
with:
recreate: true
path: code-coverage-results.md