Skip to content

[add] improve tests (#44) #23

[add] improve tests (#44)

[add] improve tests (#44) #23

name: Codacy Coverage Reporter
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Default to bash
defaults:
run:
shell: bash
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 23.x
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- name: Run test coverage
run: npm run coverage
- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@master
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
# or
# api-token: ${{ secrets.CODACY_API_TOKEN }}
coverage-reports: ./coverage/lcov.info
# or a comma-separated list for multiple reports
# coverage-reports: <PATH_TO_REPORT>, <PATH_TO_REPORT>