| ... | ... | @@ -31,11 +31,6 @@ jobs: |
| 31 | 31 | cache: true |
| 32 | 32 | run-install: true |
| 33 | 33 | |
| 34 | | - name: Setup Rust |
| 35 | | uses: dtolnay/rust-toolchain@stable |
| 36 | | with: |
| 37 | | components: rustfmt |
| 38 | | |
| 39 | 34 | - name: Ensure Electron runtime is installed |
| 40 | 35 | run: vp run --filter @t3tools/desktop ensure:electron |
| 41 | 36 | |
| ... | ... | @@ -45,9 +40,6 @@ jobs: |
| 45 | 40 | - name: Typecheck |
| 46 | 41 | run: vpr typecheck |
| 47 | 42 | |
| 48 | | - name: Check resource monitor formatting |
| 49 | | run: cargo fmt --manifest-path native/resource-monitor/Cargo.toml -- --check |
| 50 | | |
| 51 | 43 | - name: Build desktop pipeline |
| 52 | 44 | run: vp run build:desktop |
| 53 | 45 | |
| ... | ... | @@ -57,6 +49,11 @@ jobs: |
| 57 | 49 | grep -nE "desktopBridge|getLocalEnvironmentBootstrap|PICK_FOLDER_CHANNEL|wsUrl" apps/desktop/dist-electron/preload.cjs |
| 58 | 50 | grep -n "__clerk_internal_electron_passkeys" apps/desktop/dist-electron/preload.cjs |
| 59 | 51 | |
| 52 | # Everything except `t3` (apps/server). `--parallel` drops the package |
| 53 | # dependency ordering that `vp run` applies by default: these `test` tasks |
| 54 | # declare no `dependsOn` and resolve workspace deps from source, so ordering |
| 55 | # only bought us idle runners between dependency layers. The concurrency |
| 56 | # limit stays at the default 4 so peak load per runner is unchanged. |
| 60 | 57 | test: |
| 61 | 58 | name: Test |
| 62 | 59 | runs-on: blacksmith-8vcpu-ubuntu-2404 |
| ... | ... | @@ -77,20 +74,65 @@ jobs: |
| 77 | 74 | cache: true |
| 78 | 75 | run-install: true |
| 79 | 76 | |
| 80 | | - name: Setup Rust |
| 81 | | uses: dtolnay/rust-toolchain@stable |
| 82 | | |
| 83 | 77 | - name: Ensure Electron runtime is installed |
| 84 | 78 | run: vp run --filter @t3tools/desktop ensure:electron |
| 85 | 79 | |
| 80 | - name: Test |
| 81 | run: vp run --parallel --concurrency-limit 4 --filter '!t3' --filter '!@t3tools/monorepo' test |
| 82 | |
| 83 | # apps/server sets `fileParallelism: false`, so its 239 files run strictly |
| 84 | # one at a time. Sharding spreads them over separate runners instead of |
| 85 | # separate workers, so no two server test files ever share a machine and the |
| 86 | # isolation that flag buys is preserved exactly. |
| 87 | test_server: |
| 88 | name: Test Server ${{ matrix.shard }} |
| 89 | runs-on: blacksmith-8vcpu-ubuntu-2404 |
| 90 | timeout-minutes: 10 |
| 91 | strategy: |
| 92 | fail-fast: false |
| 93 | matrix: |
| 94 | shard: [1, 2, 3] |
| 95 | steps: |
| 96 | - name: Checkout |
| 97 | uses: actions/checkout@v6 |
| 98 | with: |
| 99 | sparse-checkout: | |
| 100 | /* |
| 101 | !/.repos/ |
| 102 | sparse-checkout-cone-mode: false |
| 103 | |
| 104 | - name: Setup Vite+ |
| 105 | uses: voidzero-dev/setup-vp@v1 |
| 106 | with: |
| 107 | node-version-file: package.json |
| 108 | cache: true |
| 109 | run-install: true |
| 110 | |
| 111 | # No Electron setup here: `t3` (apps/server) has no Electron dependency |
| 112 | # and none of its tests touch the runtime. Only the non-server `test` |
| 113 | # job, which covers @t3tools/desktop, needs the download. |
| 86 | 114 | - name: Test |
| 87 | 115 | env: |
| 88 | 116 | T3CODE_TRANSFER_BUDGET_REPORT_PATH: ${{ runner.temp }}/t3code-transfer-budget.md |
| 89 | 117 | T3CODE_TRANSFER_BUDGET_RESULT_PATH: ${{ runner.temp }}/thread-transfer-result.json |
| 90 | | run: vp run test |
| 118 | run: vp run --filter t3 test --shard ${{ matrix.shard }}/${{ strategy.job-total }} |
| 119 | |
| 120 | # src/server.test.ts writes the budget report, so exactly one shard |
| 121 | # produces these files. Gating the upload on their presence keeps a |
| 122 | # single `thread-transfer-results` artifact per run, which is the name |
| 123 | # thread-transfer-report.yml resolves. |
| 124 | - name: Detect transfer budget report |
| 125 | id: transfer_budget |
| 126 | if: always() |
| 127 | run: | |
| 128 | if test -f "${{ runner.temp }}/thread-transfer-result.json"; then |
| 129 | echo "present=true" >> "$GITHUB_OUTPUT" |
| 130 | else |
| 131 | echo "present=false" >> "$GITHUB_OUTPUT" |
| 132 | fi |
| 91 | 133 | |
| 92 | 134 | - name: Publish transfer budget report |
| 93 | | if: always() |
| 135 | if: always() && steps.transfer_budget.outputs.present == 'true' |
| 94 | 136 | run: | |
| 95 | 137 | if test -f "${{ runner.temp }}/t3code-transfer-budget.md"; then |
| 96 | 138 | tee -a "$GITHUB_STEP_SUMMARY" < "${{ runner.temp }}/t3code-transfer-budget.md" |
| ... | ... | @@ -99,7 +141,7 @@ jobs: |
| 99 | 141 | fi |
| 100 | 142 | |
| 101 | 143 | - name: Upload thread transfer result |
| 102 | | if: always() |
| 144 | if: always() && steps.transfer_budget.outputs.present == 'true' |
| 103 | 145 | uses: actions/upload-artifact@v7 |
| 104 | 146 | with: |
| 105 | 147 | name: thread-transfer-results |
| ... | ... | @@ -107,6 +149,29 @@ jobs: |
| 107 | 149 | if-no-files-found: ignore |
| 108 | 150 | retention-days: 30 |
| 109 | 151 | |
| 152 | # Split out of Check and Test: both paid ~7-9s to install a Rust toolchain |
| 153 | # for checks that take under 3s, on the critical path of every PR. |
| 154 | rust: |
| 155 | name: Rust |
| 156 | runs-on: blacksmith-4vcpu-ubuntu-2404 |
| 157 | timeout-minutes: 10 |
| 158 | steps: |
| 159 | - name: Checkout |
| 160 | uses: actions/checkout@v6 |
| 161 | with: |
| 162 | sparse-checkout: | |
| 163 | /* |
| 164 | !/.repos/ |
| 165 | sparse-checkout-cone-mode: false |
| 166 | |
| 167 | - name: Setup Rust |
| 168 | uses: dtolnay/rust-toolchain@stable |
| 169 | with: |
| 170 | components: rustfmt |
| 171 | |
| 172 | - name: Check resource monitor formatting |
| 173 | run: cargo fmt --manifest-path native/resource-monitor/Cargo.toml -- --check |
| 174 | |
| 110 | 175 | - name: Test resource monitor |
| 111 | 176 | run: cargo test --locked --manifest-path native/resource-monitor/Cargo.toml |
| 112 | 177 | |