Add Claude Code GitHub Workflow #2
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: E2E Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| e2e-tests: | |
| name: E2E Tests (${{ matrix.platform }}) | |
| runs-on: ${{ matrix.platform }} | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [ubuntu-latest, windows-latest] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: latest | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Rust cache | |
| uses: swatinem/rust-cache@v2 | |
| with: | |
| workspaces: src-tauri | |
| - name: Install Linux dependencies | |
| if: matrix.platform == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libwebkit2gtk-4.1-dev \ | |
| libgtk-3-dev \ | |
| libayatana-appindicator3-dev \ | |
| librsvg2-dev \ | |
| libssl-dev \ | |
| libsoup-3.0-dev \ | |
| libjavascriptcoregtk-4.1-dev \ | |
| webkit2gtk-driver \ | |
| xvfb | |
| - name: Install frontend dependencies | |
| run: pnpm install | |
| - name: Build frontend | |
| run: pnpm build | |
| - name: Build Tauri app (release) | |
| run: pnpm tauri build | |
| - name: Install tauri-driver | |
| run: cargo install tauri-driver | |
| - name: Run e2e tests (Linux) | |
| if: matrix.platform == 'ubuntu-latest' | |
| run: xvfb-run pnpm test:e2e | |
| - name: Run e2e tests (Windows) | |
| if: matrix.platform == 'windows-latest' | |
| run: pnpm test:e2e | |
| - name: Upload test artifacts on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: e2e-test-artifacts-${{ matrix.platform }} | |
| path: | | |
| test-results/ | |
| screenshots/ | |
| retention-days: 7 |