|
| 1 | +name: Test Suite |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + push: |
| 6 | + branches: |
| 7 | + - main |
| 8 | + |
| 9 | +jobs: |
| 10 | + rust-tests: |
| 11 | + name: Rust + Coverage |
| 12 | + runs-on: ubuntu-latest |
| 13 | + steps: |
| 14 | + - name: Checkout |
| 15 | + uses: actions/checkout@v4 |
| 16 | + |
| 17 | + - name: Set up Rust |
| 18 | + uses: dtolnay/rust-toolchain@stable |
| 19 | + |
| 20 | + - name: Install Rust test tooling |
| 21 | + uses: taiki-e/install-action@v2 |
| 22 | + with: |
| 23 | + tool: cargo-nextest,cargo-llvm-cov |
| 24 | + |
| 25 | + - name: Install llvm-tools |
| 26 | + run: rustup component add llvm-tools-preview |
| 27 | + |
| 28 | + - name: Run backend tests and coverage gate |
| 29 | + run: ./scripts/test-rust.sh |
| 30 | + |
| 31 | + security: |
| 32 | + name: Dependency Security |
| 33 | + runs-on: ubuntu-latest |
| 34 | + steps: |
| 35 | + - name: Checkout |
| 36 | + uses: actions/checkout@v4 |
| 37 | + |
| 38 | + - name: Set up Rust |
| 39 | + uses: dtolnay/rust-toolchain@stable |
| 40 | + |
| 41 | + - name: Install security tooling |
| 42 | + uses: taiki-e/install-action@v2 |
| 43 | + with: |
| 44 | + tool: cargo-audit,cargo-deny |
| 45 | + |
| 46 | + - name: Run cargo-audit |
| 47 | + run: cargo audit --deny warnings |
| 48 | + |
| 49 | + - name: Run cargo-deny |
| 50 | + run: cargo deny check advisories bans sources |
| 51 | + |
| 52 | + wasm-ui-tests: |
| 53 | + name: WASM UI Tests |
| 54 | + runs-on: ubuntu-latest |
| 55 | + steps: |
| 56 | + - name: Checkout |
| 57 | + uses: actions/checkout@v4 |
| 58 | + |
| 59 | + - name: Set up Rust (wasm target) |
| 60 | + uses: dtolnay/rust-toolchain@stable |
| 61 | + with: |
| 62 | + targets: wasm32-unknown-unknown |
| 63 | + |
| 64 | + - name: Install wasm-pack |
| 65 | + uses: taiki-e/install-action@v2 |
| 66 | + with: |
| 67 | + tool: wasm-pack |
| 68 | + |
| 69 | + - name: Run WASM UI tests |
| 70 | + run: ./scripts/test-wasm-ui.sh |
| 71 | + |
| 72 | + e2e-tests: |
| 73 | + name: Playwright E2E |
| 74 | + runs-on: ubuntu-latest |
| 75 | + steps: |
| 76 | + - name: Checkout |
| 77 | + uses: actions/checkout@v4 |
| 78 | + |
| 79 | + - name: Set up Node.js |
| 80 | + uses: actions/setup-node@v4 |
| 81 | + with: |
| 82 | + node-version: "22" |
| 83 | + cache: npm |
| 84 | + |
| 85 | + - name: Install JavaScript dependencies |
| 86 | + run: npm install |
| 87 | + |
| 88 | + - name: Install Playwright browser |
| 89 | + run: npx playwright install --with-deps chromium |
| 90 | + |
| 91 | + - name: Set up Rust (wasm target) |
| 92 | + uses: dtolnay/rust-toolchain@stable |
| 93 | + with: |
| 94 | + targets: wasm32-unknown-unknown |
| 95 | + |
| 96 | + - name: Install trunk |
| 97 | + uses: taiki-e/install-action@v2 |
| 98 | + with: |
| 99 | + tool: trunk |
| 100 | + |
| 101 | + - name: Run Playwright E2E tests |
| 102 | + env: |
| 103 | + EXOCLAW_E2E_PORT: "7210" |
| 104 | + EXOCLAW_E2E_TOKEN: "e2e-test-token" |
| 105 | + run: npm run test:e2e |
| 106 | + |
| 107 | + - name: Upload Playwright artifacts |
| 108 | + if: always() |
| 109 | + uses: actions/upload-artifact@v4 |
| 110 | + with: |
| 111 | + name: playwright-artifacts |
| 112 | + path: output/playwright |
| 113 | + if-no-files-found: ignore |
0 commit comments