feat: 公司帳交易可填營業稅額(進項稅額)+ 401 報表算出應納稅額 (plan 286) #137
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: CI | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| # Existing gate: lint + tsc + vitest. Unchanged in content. | |
| checks: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: lts/* | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run lint | |
| - run: npm run format:check | |
| - run: npx tsc | |
| - run: npm test | |
| # Catches bundler-only failures the tsc gate misses (`build` = tsc && vite build). | |
| # `prebuild` (inject-private-assets.mjs) no-ops gracefully when private-assets/ is | |
| # absent, so no secrets are required here. | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: lts/* | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run build | |
| # Compiles the Rust shell (cargo fmt --check && cargo check). Rust setup and the | |
| # Linux system deps mirror release.yml's publish-tauri job for consistency. | |
| tauri: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install Rust (stable) | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Rust build | |
| uses: swatinem/rust-cache@v2 | |
| with: | |
| workspaces: src-tauri | |
| - name: Install Linux system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libwebkit2gtk-4.1-dev \ | |
| libappindicator3-dev \ | |
| librsvg2-dev \ | |
| patchelf | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: lts/* | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run check:tauri | |
| # Typechecks the sync worker (its own package.json / tsconfig, compiles standalone). | |
| worker: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| defaults: | |
| run: | |
| working-directory: worker | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: lts/* | |
| cache: npm | |
| cache-dependency-path: worker/package-lock.json | |
| - run: npm ci | |
| - run: npx tsc --noEmit | |
| - run: npm test | |
| # Playwright smoke test: drives the wired-up first-run flow (trust surfaces → | |
| # cash-flow filters → ⌘N quick-add → recompute) that the unit suite can't cover. | |
| # playwright.config.ts runs the single smoke spec under two projects — chromium | |
| # and a mobile (WebKit) device — so both browsers are installed. The dev server | |
| # is launched by the config's `webServer` (npm run dev). | |
| e2e: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: lts/* | |
| cache: npm | |
| - run: npm ci | |
| - run: npx playwright install --with-deps chromium webkit | |
| - run: npm run test:e2e |