Release/260408 #12
Workflow file for this run
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: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| # Fast smoke tests run first to fail fast | |
| smoke: | |
| name: Smoke Tests (typecheck, lint, unit) | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: '1.3.10' | |
| - name: Cache Bun dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules | |
| ~/.bun/install/cache | |
| key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-bun- | |
| - name: Install frontend dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Setup Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - name: Cache Rust build artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: src-tauri -> src-tauri/target | |
| - name: Run smoke tests | |
| run: bun run test:smoke | |
| # Parallel database integration tests | |
| integration: | |
| name: Integration Tests (${{ matrix.database }}) | |
| runs-on: ubuntu-22.04 | |
| needs: smoke | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| database: | |
| - mysql | |
| - postgres | |
| - mariadb | |
| - clickhouse | |
| - mssql | |
| - sqlite | |
| - duckdb | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: '1.3.10' | |
| - name: Cache Bun dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules | |
| ~/.bun/install/cache | |
| key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-bun- | |
| - name: Install frontend dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Setup Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Rust build artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: src-tauri -> src-tauri/target | |
| key: ${{ matrix.database }} | |
| - name: Run ${{ matrix.database }} integration tests | |
| run: IT_DB=${{ matrix.database }} bun run test:integration | |
| - name: Docker diagnostics on failure | |
| if: failure() | |
| run: | | |
| echo "==== docker ps -a ====" | |
| docker ps -a || true | |
| echo "==== Container logs ====" | |
| docker ps -aq | xargs -I {} sh -c 'echo "--- Container {} ---" && docker logs {} 2>&1 | tail -50' || true | |
| # Summary job to check all tests passed | |
| ci-success: | |
| name: CI Success | |
| runs-on: ubuntu-22.04 | |
| needs: [smoke, integration] | |
| if: always() | |
| steps: | |
| - name: Check all jobs succeeded | |
| run: | | |
| if [ "${{ needs.smoke.result }}" != "success" ]; then | |
| echo "Smoke tests failed" | |
| exit 1 | |
| fi | |
| if [ "${{ needs.integration.result }}" != "success" ]; then | |
| echo "Integration tests failed" | |
| exit 1 | |
| fi | |
| echo "All CI checks passed!" |