spike(cross-platform): real Win/Linux installers (deb/appimage/nsis) … #881
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| frontend: | |
| name: Frontend (typecheck + build) | |
| runs-on: macos-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: pnpm/action-setup@v6 | |
| with: | |
| version: 10 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Install | |
| run: pnpm install --frozen-lockfile | |
| - name: Lint | |
| run: pnpm lint | |
| - name: Type-check | |
| run: pnpm tsc --noEmit | |
| - name: Build | |
| run: pnpm build | |
| - name: Run unit tests with coverage | |
| run: pnpm test:coverage | |
| if: hashFiles('vitest.config.ts') != '' | |
| - name: Upload coverage to Codecov | |
| if: hashFiles('coverage/lcov.info') != '' | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| files: ./coverage/lcov.info | |
| flags: frontend | |
| fail_ci_if_error: false | |
| e2e: | |
| name: E2E (Playwright) | |
| runs-on: macos-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: pnpm/action-setup@v6 | |
| with: | |
| version: 10 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Install | |
| run: pnpm install --frozen-lockfile | |
| - name: Install Playwright browser | |
| run: pnpm exec playwright install --with-deps chromium | |
| # The Tauri IPC is stubbed (e2e/tauri-mock.ts), so the React frontend | |
| # runs against the plain Vite dev server — Playwright's webServer block | |
| # starts it automatically on port 1420. | |
| - name: Run Playwright tests | |
| run: pnpm test:e2e | |
| - name: Upload Playwright report | |
| if: ${{ !cancelled() }} | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 7 | |
| ios: | |
| name: iOS (MarkupKit tests + app build) | |
| runs-on: macos-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| # Pin a Swift 6 toolchain so Swift Testing (`import Testing`) is available | |
| # regardless of the runner image's default Xcode. | |
| - uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Swift version | |
| run: swift --version | |
| # MarkupKit is pure Foundation logic (no UIKit/iOS SDK), so it builds and | |
| # tests on the macOS host — no simulator needed. | |
| - name: Test MarkupKit | |
| run: swift test --package-path ios/MarkupKit | |
| # Compile the full SwiftUI app for the simulator (no signing) so UI-layer | |
| # regressions are caught in CI, not just by local xcodebuild. | |
| - name: Build MarkupApp (simulator) | |
| run: | | |
| xcodebuild \ | |
| -project ios/MarkupApp/MarkupApp.xcodeproj \ | |
| -scheme MarkupApp \ | |
| -configuration Debug \ | |
| -sdk iphonesimulator \ | |
| -destination 'generic/platform=iOS Simulator' \ | |
| CODE_SIGNING_ALLOWED=NO \ | |
| build | |
| rust: | |
| name: Rust (build + test) | |
| runs-on: macos-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: pnpm/action-setup@v6 | |
| with: | |
| version: 10 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Install frontend deps (needed for tauri build/dev resolution) | |
| run: pnpm install --frozen-lockfile | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: llvm-tools-preview | |
| - name: Cache cargo registry + target | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: src-tauri | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| # Unit + integration tests run in dev profile because the release | |
| # profile sets panic=abort, which is incompatible with test harnesses | |
| # that catch unwinds. Spike-0.3 bench is skipped in CI (run locally | |
| # via `pnpm bench:spike03`); it needs release-mode timings to be | |
| # meaningful and is too slow on macOS runners. | |
| - name: Cargo test with coverage | |
| working-directory: src-tauri | |
| run: cargo llvm-cov --lcov --output-path lcov.info | |
| - name: Upload Rust coverage to Codecov | |
| if: hashFiles('src-tauri/lcov.info') != '' | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| files: ./src-tauri/lcov.info | |
| flags: rust | |
| fail_ci_if_error: false | |
| - name: Cargo build --release (verifies the binary links) | |
| working-directory: src-tauri | |
| run: cargo build --release |