ci: update github actions for cov badge with pages #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Run Jest tests | |
run: yarn test | |
- name: Create Coverage Badges | |
uses: jaywcjlove/coverage-badges-cli@main | |
with: | |
style: flat | |
source: coverage/coverage-summary.json | |
output: coverage/badges.svg | |
jsonPath: totals.percent_covered | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./build |