Skip to content

ditch circleci, switch yarn to pnpm, and update husky #3

ditch circleci, switch yarn to pnpm, and update husky

ditch circleci, switch yarn to pnpm, and update husky #3

Workflow file for this run

name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
install_dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Read .nvmrc
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_ENV
id: nvm
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node
uses: actions/setup-node@v5
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Cache workspace
uses: actions/cache/save@v4
with:
path: .
key: workspace-${{ github.sha }}
lint:
runs-on: ubuntu-latest
needs: install_dependencies
steps:
- name: Restore workspace
uses: actions/cache/restore@v4
with:
path: .
key: workspace-${{ github.sha }}
- name: Lint
run: pnpm lint:ci
unit_tests:
runs-on: ubuntu-latest
needs: install_dependencies
steps:
- name: Restore workspace
uses: actions/cache/restore@v4
with:
path: .
key: workspace-${{ github.sha }}
- name: Unit tests with coverage
run: pnpm test:ci
- name: Upload coverage artifact
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: vitest-coverage
path: vitest-coverage