Skip to content

change code coverage action #79

change code coverage action

change code coverage action #79

Workflow file for this run

name: MJBarChart Test
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node and NPM
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- name: Install and Build
run: npm ci
- name: Prettier
run: npm run prettier
- name: Tests
run: npm run test:coverage
- name: Code Coverage
uses: greatwizard/coverage-diff-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
coverage-filename: coverage/cobertura-coverage.xml
allowed-to-fail: false
badge-enabled: true
badge-threshold-green: 90
badge-threshold-orange: 80
- name: Generate Changelog
run: git log --oneline $(git describe --tags --abbrev=0)..HEAD >> CHANGELOG.txt
- name: Release
uses: softprops/action-gh-release@v1
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
body_path: CHANGELOG.txt
draft: true