Fix multiplayer 500s: disable Sentry RPC trace propagation #84
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/CD | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| check: | |
| name: Check & Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Install wasm32 target | |
| run: rustup target add wasm32-unknown-unknown | |
| - name: Cache Cargo | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "20" | |
| - name: Check Rust formatting | |
| run: cargo fmt --check | |
| - name: Check formatting (Prettier) | |
| run: npx --yes prettier@3.7.4 --check . | |
| - name: Run clippy | |
| run: cargo clippy --workspace -- -D warnings | |
| - name: Run tests | |
| run: cargo test --workspace | |
| - name: Check WASM build | |
| run: cargo check --target wasm32-unknown-unknown | |
| - name: Install Graphviz | |
| run: sudo apt-get update && sudo apt-get install -y graphviz | |
| - name: Check diagrams render | |
| run: npm run check:diagrams | |
| # End-to-end browser smoke against a local wrangler dev server. Non-gating for | |
| # deploys so a headless-browser hiccup never blocks one. | |
| e2e: | |
| name: E2E (Playwright) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install wasm32 target | |
| run: rustup target add wasm32-unknown-unknown | |
| - name: Install wasm-pack | |
| run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "20" | |
| - name: Install npm dependencies | |
| run: npm ci --ignore-scripts | |
| - name: Install Playwright browser | |
| run: npx playwright install --with-deps chromium | |
| - name: Build | |
| run: npm run build | |
| - name: Run e2e tests | |
| run: npm run test:e2e | |
| deploy: | |
| name: Deploy | |
| runs-on: ubuntu-latest | |
| needs: check | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install wasm32 target | |
| run: rustup target add wasm32-unknown-unknown | |
| - name: Install wasm-pack | |
| run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "20" | |
| - name: Build | |
| run: npm run build | |
| env: | |
| SENTRY_DSN: ${{ vars.SENTRY_DSN }} | |
| SENTRY_ENVIRONMENT: production | |
| SENTRY_RELEASE: ${{ github.sha }} | |
| - name: Deploy to Cloudflare Workers | |
| uses: cloudflare/wrangler-action@v4 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| command: deploy --var SENTRY_RELEASE:${{ github.sha }} | |
| env: | |
| SENTRY_DSN: ${{ vars.SENTRY_DSN }} | |
| SENTRY_ENVIRONMENT: production | |
| SENTRY_RELEASE: ${{ github.sha }} |