Files
multica/.github/workflows/ci.yml
Jiayuan 98ba6cba31 ci: enable CI for pull requests to dev branch
Add dev branch to the pull_request trigger so that CI runs on PRs to dev, matching the configuration for main branch.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-23 16:08:17 +08:00

65 lines
1.4 KiB
YAML

name: CI
on:
push:
branches: ['*']
pull_request:
branches: [main, dev]
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: TypeScript check
run: pnpm typecheck
- name: ESLint
run: pnpm lint --max-warnings 0
- name: Prettier check
run: pnpm format:check
- name: Run tests with coverage
run: pnpm test:coverage
- name: Build application
run: pnpm build
- name: Upload coverage report
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-report
path: coverage/
retention-days: 7