feat: [BE-20] Waitlist — queue members for fully-booked workspaces and notify on availability #1011
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: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| defaults: | |
| run: | |
| working-directory: contracts # all cargo commands run in contracts/ | |
| jobs: | |
| format: | |
| name: Format Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| env: | |
| RUSTUP_TOOLCHAIN: stable | |
| with: | |
| components: rustfmt | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| clippy: | |
| name: Clippy Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| env: | |
| RUSTUP_TOOLCHAIN: stable | |
| with: | |
| components: clippy | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| contracts/target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('''contracts/Cargo.lock''') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Run clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| test: | |
| name: Test Suite | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| env: | |
| RUSTUP_TOOLCHAIN: stable | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| contracts/target | |
| key: ${{ runner.os }}-cargo-test-${{ hashFiles('''contracts/Cargo.lock''') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-test- | |
| ${{ runner.os }}-cargo- | |
| - name: Run tests | |
| run: cargo test --all --verbose | |
| build: | |
| name: Build Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| env: | |
| RUSTUP_TOOLCHAIN: stable | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| contracts/target | |
| key: ${{ runner.os }}-cargo-build-${{ hashFiles('''contracts/Cargo.lock''') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-build- | |
| ${{ runner.os }}-cargo- | |
| - name: Build all crates | |
| run: cargo build --all --verbose | |
| # ───────────────────────────────────────────── | |
| # WASM SIZE REPORT | |
| # ───────────────────────────────────────────── | |
| size-report: | |
| name: WASM Size Report | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| env: | |
| RUSTUP_TOOLCHAIN: stable | |
| - name: Add WASM target | |
| run: rustup target add wasm32v1-none | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| contracts/target | |
| key: ${{ runner.os }}-cargo-size-${{ hashFiles('''contracts/Cargo.lock''') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-size- | |
| ${{ runner.os }}-cargo- | |
| - name: Build and report WASM sizes | |
| run: bash contracts/scripts/track-wasm-size.sh | |
| - name: Check WASM budget | |
| run: bash contracts/scripts/track-wasm-size.sh --check | |
| # ───────────────────────────────────────────── | |
| # BACKEND — NestJS | |
| # ───────────────────────────────────────────── | |
| backend: | |
| name: Backend (NestJS) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: backend | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| cache-dependency-path: backend/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Lint | |
| run: npm run lint | |
| - name: Build (TypeScript check) | |
| run: npm run build | |
| - name: Unit tests | |
| run: npm run test -- --passWithNoTests | |
| # ───────────────────────────────────────────── | |
| # FRONTEND — Next.js | |
| # ───────────────────────────────────────────── | |
| frontend: | |
| name: Frontend (Next.js) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Lint | |
| run: npm run lint | |
| - name: Unit & Component Tests | |
| run: npm run test:cov | |
| - name: Typecheck | |
| run: npm run typecheck | |
| - name: Build | |
| run: npm run build | |
| env: | |
| NEXT_PUBLIC_API_URL: http://localhost:3001 | |
| # ───────────────────────────────────────────── | |
| # SECURITY AUDIT | |
| # ───────────────────────────────────────────── | |
| security-audit: | |
| name: Security Audit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| env: | |
| RUSTUP_TOOLCHAIN: stable | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| contracts/target | |
| key: ${{ runner.os }}-cargo-audit-${{ hashFiles('''contracts/Cargo.lock''') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-audit- | |
| ${{ runner.os }}-cargo- | |
| - name: Install cargo-deny | |
| run: cargo install cargo-deny | |
| - name: Run cargo-deny | |
| run: cargo deny check | |
| working-directory: contracts | |
| - name: Install cargo-audit | |
| run: cargo install cargo-audit | |
| - name: Run cargo-audit | |
| run: cargo audit | |
| working-directory: contracts | |
| e2e: | |
| name: Frontend E2E (Playwright) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install Playwright Browsers | |
| run: npx playwright install --with-deps chromium | |
| - name: Run E2E Tests | |
| run: npm run test:e2e | |
| env: | |
| NEXT_PUBLIC_API_URL: http://localhost:3001 | |
| - name: Upload Playwright Artifacts on Failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-e2e-results | |
| path: | | |
| frontend/playwright-report/ | |
| frontend/test-results/ | |
| retention-days: 7 | |