Skip to content

Update ci.yml

Update ci.yml #79

Workflow file for this run

name: CI
on:
pull_request:
branches: [main, dev]
push:
branches: [main, dev]
jobs:
lint-and-test:
runs-on: self-hosted
strategy:
fail-fast: false
matrix:
workspace: [frontend, backend]
defaults:
run:
working-directory: ${{ matrix.workspace }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24.21.0
- uses: pnpm/action-setup@v4
with:
version: 11.25.0
- name: Get pnpm store path
id: pnpm-store
run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v4
with:
path: ${{ steps.pnpm-store.outputs.path }}
key: pnpm-${{ runner.os }}-${{ matrix.workspace }}-${{ hashFiles(format('{0}/pnpm-lock.yaml', matrix.workspace)) }}
restore-keys: pnpm-${{ runner.os }}-${{ matrix.workspace }}-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm run lint
- name: Typecheck
run: pnpm run --if-present typecheck
- name: Test
run: pnpm run --if-present test --run