Fan out display-name rename to every cohort (ARB-513) (#390) #349
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 | |
| jobs: | |
| changes: | |
| name: Detect Changes | |
| runs-on: ubuntu-latest | |
| outputs: | |
| backend: ${{ steps.filter.outputs.backend }} | |
| frontend: ${{ steps.filter.outputs.frontend }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| filters: | | |
| backend: | |
| - 'backend/**' | |
| - 'schema/**' | |
| frontend: | |
| - 'frontend/**' | |
| - 'schema/**' | |
| - 'schema-js/**' | |
| backend: | |
| name: Backend Tests | |
| needs: changes | |
| if: ${{ needs.changes.outputs.backend == 'true' }} | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: backend | |
| env: | |
| SQLX_OFFLINE: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install protoc | |
| uses: arduino/setup-protoc@v3 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy, llvm-tools-preview | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| backend/target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('backend/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Run clippy | |
| run: cargo clippy -- -D warnings | |
| - name: Run unit tests | |
| run: cargo test | |
| - name: Run clippy (with dev-mode features) | |
| run: cargo clippy --features dev-mode -- -D warnings | |
| - name: Run all tests (including integration) | |
| run: cargo test --features dev-mode | |
| # - name: Install cargo-llvm-cov | |
| # uses: taiki-e/install-action@cargo-llvm-cov | |
| # - name: Generate coverage report | |
| # run: cargo llvm-cov --features dev-mode --html | |
| # - name: Upload coverage report | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: coverage-report | |
| # path: backend/target/llvm-cov/html/ | |
| frontend: | |
| name: Frontend Checks | |
| needs: changes | |
| if: ${{ needs.changes.outputs.frontend == 'true' }} | |
| runs-on: ubuntu-latest | |
| env: | |
| PUBLIC_KINDE_CLIENT_ID: dummy | |
| PUBLIC_KINDE_DOMAIN: https://example.com | |
| PUBLIC_SERVER_URL: ws://localhost:8080 | |
| PUBLIC_KINDE_REDIRECT_URI: http://localhost:5173 | |
| PUBLIC_SCENARIOS_SERVER_URL: http://localhost:8000 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Run type check | |
| run: pnpm --filter frontend run check | |
| - name: Run lint | |
| run: pnpm --filter frontend run lint |