Skip to content

fix: two bugs

fix: two bugs #5

Workflow file for this run

name: Testing
on:
push:
branches:
- main
pull_request:
jobs:
Linting:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 9
- name: Install Node v20
uses: actions/setup-node@v3
with:
node-version: 20
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Run Eslint
run: pnpm run lint --fix=false
Format:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 9
- name: Install Node v20
uses: actions/setup-node@v3
with:
node-version: 20
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Run Prettier
run: pnpm run test:format
Building:
name: Building
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 9
- name: Install Node v20
uses: actions/setup-node@v3
with:
node-version: 20
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Build Code
run: pnpm run build
Testing:
name: Unit Testing
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 9
- name: Install Node v20
uses: actions/setup-node@v3
with:
node-version: 20
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Run Test
run: pnpm run test --coverage
- name: Store Code Coverage Report
uses: actions/upload-artifact@v3
with:
name: coverage
path: coverage/
Codecov:
name: CodeCov
needs: [Testing]
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Download Coverage Report
uses: actions/download-artifact@v3
with:
name: coverage
path: coverage/
- name: Upload Coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: coverage/
fail_ci_if_error: true