feat: WarpGrid Cloud Platform (beta launch) #153
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: Integration Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| schedule: | |
| # Nightly at 3am UTC — catches flaky regressions on main | |
| - cron: '0 3 * * *' | |
| workflow_dispatch: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: "-D warnings" | |
| # Cancel in-progress runs for the same PR/branch | |
| concurrency: | |
| group: integration-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # ── T1: Rust HTTP + Postgres ────────────────────────────────────── | |
| t1-rust-http-postgres: | |
| name: "T1: Rust HTTP + Postgres" | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| timeout-minutes: 15 | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: testuser | |
| POSTGRES_PASSWORD: testpass | |
| POSTGRES_DB: testdb | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U testuser" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| --tmpfs /var/lib/postgresql/data | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-wasip2 | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install wasmtime | |
| uses: bytecodealliance/actions/wasmtime/setup@v1 | |
| with: | |
| version: "v41.0.0" | |
| - name: Build T1 | |
| run: cargo build -p t1-rust-http-postgres 2>&1 || echo "BUILD_FAILED" | |
| continue-on-error: true | |
| id: build | |
| - name: Test T1 | |
| if: steps.build.outcome == 'success' | |
| run: cargo test -p t1-rust-http-postgres | |
| env: | |
| DATABASE_URL: "postgres://testuser:testpass@localhost:5432/testdb" | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results-t1 | |
| path: test-results/t1-* | |
| if-no-files-found: ignore | |
| retention-days: 7 | |
| # ── T2: Rust HTTP + Redis + Postgres ────────────────────────────── | |
| t2-rust-http-redis-postgres: | |
| name: "T2: Rust HTTP + Redis + Postgres" | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| timeout-minutes: 15 | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: testuser | |
| POSTGRES_PASSWORD: testpass | |
| POSTGRES_DB: testdb | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U testuser" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| --tmpfs /var/lib/postgresql/data | |
| redis: | |
| image: redis:7 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-wasip2 | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install wasmtime | |
| uses: bytecodealliance/actions/wasmtime/setup@v1 | |
| with: | |
| version: "v41.0.0" | |
| - name: Build T2 | |
| run: cargo build -p t2-rust-http-redis-postgres 2>&1 || echo "BUILD_FAILED" | |
| continue-on-error: true | |
| id: build | |
| - name: Test T2 | |
| if: steps.build.outcome == 'success' | |
| run: cargo test -p t2-rust-http-redis-postgres | |
| env: | |
| DATABASE_URL: "postgres://testuser:testpass@localhost:5432/testdb" | |
| REDIS_URL: "redis://localhost:6379" | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results-t2 | |
| path: test-results/t2-* | |
| if-no-files-found: ignore | |
| retention-days: 7 | |
| # ── T3: Go HTTP + Postgres ──────────────────────────────────────── | |
| t3-go-http-postgres: | |
| name: "T3: Go HTTP + Postgres" | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| timeout-minutes: 15 | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: testuser | |
| POSTGRES_PASSWORD: testpass | |
| POSTGRES_DB: testdb | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U testuser" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| --tmpfs /var/lib/postgresql/data | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.22' | |
| - name: Build & Test T3 | |
| run: test-apps/t3-go-http-postgres/test.sh | |
| env: | |
| DATABASE_URL: "postgres://testuser:testpass@localhost:5432/testdb" | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results-t3 | |
| path: test-results/t3-* | |
| if-no-files-found: ignore | |
| retention-days: 7 | |
| # ── T4: TypeScript HTTP + Postgres ───────────────────────────────── | |
| t4-ts-http-postgres: | |
| name: "T4: TypeScript HTTP + Postgres" | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Cache wasm-tools | |
| id: wasm-tools-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/bin/wasm-tools | |
| key: wasm-tools-${{ runner.os }}-v1 | |
| - name: Install wasm-tools | |
| if: steps.wasm-tools-cache.outputs.cache-hit != 'true' | |
| run: cargo install wasm-tools | |
| - name: Cache ComponentizeJS | |
| uses: actions/cache@v4 | |
| with: | |
| path: build/componentize-js/node_modules | |
| key: componentize-js-npm-${{ hashFiles('scripts/build-componentize-js.sh') }} | |
| - name: Build ComponentizeJS toolchain | |
| run: scripts/build-componentize-js.sh --npm | |
| - name: Install T4 dependencies | |
| run: npm ci --prefix test-apps/t4-ts-http-postgres | |
| - name: Build & Test T4 | |
| run: test-apps/t4-ts-http-postgres/test.sh | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results-t4 | |
| path: test-results/t4-* | |
| if-no-files-found: ignore | |
| retention-days: 7 | |
| # ── T5: Bun HTTP + Postgres ──────────────────────────────────────── | |
| t5-bun-http-postgres: | |
| name: "T5: Bun HTTP + Postgres" | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Cache wasm-tools | |
| id: wasm-tools-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/bin/wasm-tools | |
| key: wasm-tools-${{ runner.os }}-v1 | |
| - name: Install wasm-tools | |
| if: steps.wasm-tools-cache.outputs.cache-hit != 'true' | |
| run: cargo install wasm-tools | |
| - name: Cache ComponentizeJS | |
| uses: actions/cache@v4 | |
| with: | |
| path: build/componentize-js/node_modules | |
| key: componentize-js-npm-${{ hashFiles('scripts/build-componentize-js.sh') }} | |
| - name: Build ComponentizeJS toolchain | |
| run: scripts/build-componentize-js.sh --npm | |
| - name: Install T5 dependencies | |
| run: bun install --frozen-lockfile --cwd test-apps/t5-bun-http-postgres | |
| - name: Build & Test T5 | |
| run: test-apps/t5-bun-http-postgres/test.sh | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results-t5 | |
| path: test-results/t5-* | |
| if-no-files-found: ignore | |
| retention-days: 7 | |
| # ── T6: Multi-service polyglot ───────────────────────────────────── | |
| t6-multi-service: | |
| name: "T6: Multi-service Polyglot" | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| timeout-minutes: 15 | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: testuser | |
| POSTGRES_PASSWORD: testpass | |
| POSTGRES_DB: testdb | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U testuser" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| --tmpfs /var/lib/postgresql/data | |
| redis: | |
| image: redis:7 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-wasip2 | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.22' | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install wasmtime | |
| uses: bytecodealliance/actions/wasmtime/setup@v1 | |
| with: | |
| version: "v41.0.0" | |
| - name: Cache wasm-tools | |
| id: wasm-tools-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/bin/wasm-tools | |
| key: wasm-tools-${{ runner.os }}-v1 | |
| - name: Install wasm-tools | |
| if: steps.wasm-tools-cache.outputs.cache-hit != 'true' | |
| run: cargo install wasm-tools | |
| - name: Cache ComponentizeJS | |
| uses: actions/cache@v4 | |
| with: | |
| path: build/componentize-js/node_modules | |
| key: componentize-js-npm-${{ hashFiles('scripts/build-componentize-js.sh') }} | |
| - name: Build ComponentizeJS toolchain | |
| run: scripts/build-componentize-js.sh --npm | |
| - name: Build all T6 services | |
| run: | | |
| echo "Building gateway (Rust)..." | |
| cargo build -p t6-gateway-svc | |
| echo "Building user-svc (Go)..." | |
| test-apps/t6-multi-service/user-svc/build.sh --standalone | |
| echo "Building notification-svc (TypeScript)..." | |
| test-apps/t6-multi-service/notification-svc/build.sh --standalone | |
| echo "Building analytics-svc (Bun)..." | |
| test-apps/t6-multi-service/analytics-svc/build.sh --standalone | |
| - name: Test T6 multi-service integration | |
| run: scripts/test-all.sh --only t6 | |
| env: | |
| DATABASE_URL: "postgres://testuser:testpass@localhost:5432/testdb" | |
| REDIS_URL: "redis://localhost:6379" | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results-t6 | |
| path: test-results/t6-* | |
| if-no-files-found: ignore | |
| retention-days: 7 | |
| # ── Summary gate ─────────────────────────────────────────────────── | |
| integration-summary: | |
| name: Integration Summary | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| if: always() | |
| needs: | |
| - t1-rust-http-postgres | |
| - t2-rust-http-redis-postgres | |
| - t3-go-http-postgres | |
| - t4-ts-http-postgres | |
| - t5-bun-http-postgres | |
| - t6-multi-service | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: test-results/ | |
| pattern: test-results-* | |
| merge-multiple: true | |
| - name: Annotate trigger context | |
| run: | | |
| if [ "${{ github.event_name }}" = "schedule" ]; then | |
| echo "::notice::This run was triggered by the nightly schedule (cron). Failures may indicate flaky regressions." | |
| echo "> **Nightly scheduled run** — failures here may indicate flaky regressions on main." >> "$GITHUB_STEP_SUMMARY" | |
| echo "" >> "$GITHUB_STEP_SUMMARY" | |
| fi | |
| - name: Summary | |
| run: | | |
| echo "## Integration Test Results" >> "$GITHUB_STEP_SUMMARY" | |
| echo "" >> "$GITHUB_STEP_SUMMARY" | |
| echo "| Test App | Status |" >> "$GITHUB_STEP_SUMMARY" | |
| echo "|----------|--------|" >> "$GITHUB_STEP_SUMMARY" | |
| echo "| T1: Rust HTTP + Postgres | ${{ needs.t1-rust-http-postgres.result }} |" >> "$GITHUB_STEP_SUMMARY" | |
| echo "| T2: Rust HTTP + Redis + Postgres | ${{ needs.t2-rust-http-redis-postgres.result }} |" >> "$GITHUB_STEP_SUMMARY" | |
| echo "| T3: Go HTTP + Postgres | ${{ needs.t3-go-http-postgres.result }} |" >> "$GITHUB_STEP_SUMMARY" | |
| echo "| T4: TypeScript HTTP + Postgres | ${{ needs.t4-ts-http-postgres.result }} |" >> "$GITHUB_STEP_SUMMARY" | |
| echo "| T5: Bun HTTP + Postgres | ${{ needs.t5-bun-http-postgres.result }} |" >> "$GITHUB_STEP_SUMMARY" | |
| echo "| T6: Multi-service Polyglot | ${{ needs.t6-multi-service.result }} |" >> "$GITHUB_STEP_SUMMARY" | |
| echo "" >> "$GITHUB_STEP_SUMMARY" | |
| FAILED=0 | |
| for result in \ | |
| "${{ needs.t1-rust-http-postgres.result }}" \ | |
| "${{ needs.t2-rust-http-redis-postgres.result }}" \ | |
| "${{ needs.t3-go-http-postgres.result }}" \ | |
| "${{ needs.t4-ts-http-postgres.result }}" \ | |
| "${{ needs.t5-bun-http-postgres.result }}" \ | |
| "${{ needs.t6-multi-service.result }}"; do | |
| if [ "$result" = "failure" ]; then | |
| FAILED=$((FAILED + 1)) | |
| fi | |
| done | |
| if [ "$FAILED" -gt 0 ]; then | |
| echo "**$FAILED test app(s) failed.**" >> "$GITHUB_STEP_SUMMARY" | |
| exit 1 | |
| else | |
| echo "All integration tests passed." >> "$GITHUB_STEP_SUMMARY" | |
| fi |