Skip to content

report test coverage in a PR #101

report test coverage in a PR

report test coverage in a PR #101

Workflow file for this run

name: code check
on: [pull_request]
jobs:
merge-gatekeeper:
name: Mergeability
runs-on: ubuntu-latest
permissions:
checks: read
statuses: read
steps:
- name: Run Merge Gatekeeper
uses: upsidr/merge-gatekeeper@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
self: Mergeability
actionlint:
name: lint github actions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: reviewdog/action-actionlint@v1
yarn-check:
name: yarn ${{ matrix.command }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
command: ["lint:ci", "format:ci", "build:scss", "build:ts", "test:coverage"]
steps:
- uses: actions/checkout@v4
- name: Set node package manager
run: corepack enable
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
cache: 'yarn'
- name: Install project dependencies
run: yarn install --immutable --immutable-cache
- name: Check ${{ matrix.command }}
run: yarn ${{ matrix.command }}
env:
FORCE_COLOR: 2
- run: ls -la './src/__tests__/coverage/
- run: ls -la './src/__tests__/coverage/.tmp
- name: 'Report Coverage'
if: always() && ${{ matrix.command == 'test:coverage' }}
uses: davelosert/vitest-coverage-report-action@v2
with:
json-summary-path : './src/__tests__/coverage/coverage-summary.json'