Unit Test #59
This file contains hidden or 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: Unit Test | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 7 * * 0' | |
jobs: | |
unit-test: | |
if: github.repository == 'KemingHe/mantine-template' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up pnpm before node | |
# Pinned to commit hash of release v4.0.0 on 05/07/24 | |
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 | |
# Omit with to use package.json packageManager field pnpm version | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Unit test | |
run: pnpm test:unit:coverage | |
- name: Upload coverage reports to Codecov | |
# Pinned to commit hash of release v5.1.2 on 12/18/24 | |
uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: ${{ github.repository }} | |