From cea261a5fe17319907ae21b549dbfcffad12d514 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 12 Jul 2026 06:40:47 +0000 Subject: [PATCH] Add CI workflow: frontend build + cargo check on Windows/macOS Runs on every pull request and push to master: - Frontend job (ubuntu): npm ci + npm run build (tsc + vite) - Rust job (windows/macos matrix): cargo check, with the frontend built first since tauri::generate_context! requires ../dist to exist Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01JVtVF1udRytBv7axGtvoiR --- .github/workflows/ci.yml | 59 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..75b7504 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,59 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + +jobs: + frontend: + name: Frontend (tsc + vite build) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - name: Install dependencies + run: npm ci + + - name: Build frontend + run: npm run build + + rust: + name: Rust (cargo check — ${{ matrix.platform }}) + strategy: + fail-fast: false + matrix: + platform: + - windows-latest + - macos-latest + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - uses: dtolnay/rust-toolchain@stable + + - uses: swatinem/rust-cache@v2 + with: + workspaces: src-tauri + + - name: Install dependencies + run: npm ci + + # tauri::generate_context! がコンパイル時に frontendDist (../dist) を要求するため、 + # cargo check の前にフロントエンドをビルドしておく + - name: Build frontend + run: npm run build + + - name: Check Rust backend + run: cargo check --manifest-path src-tauri/Cargo.toml