also looking at this
Expand BunPress guide and pre-E2E quality gates
#35
40 files
+1524
-373
| @@ -175,6 +175,53 @@ jobs: | ||
| 175 | 175 | - name: Design tokens |
| 176 | 176 | run: bun scripts/verify-tokens.ts |
| 177 | 177 | |
| 178 | build: | |
| 179 | runs-on: ubuntu-latest | |
| 180 | ||
| 181 | steps: | |
| 182 | - name: Checkout Code | |
| 183 | uses: actions/checkout@v4 | |
| 184 | ||
| 185 | - name: Setup Pantry | |
| 186 | uses: pantry-pm/pantry/packages/action@c1417d98f5613290bc3b1f96d35086b834684659 # v0.10.47 + the socket-hang-up retry fix | |
| 187 | with: | |
| 188 | install: 'false' | |
| 189 | ||
| 190 | - name: Use cached node_modules | |
| 191 | uses: actions/cache@v4 | |
| 192 | with: | |
| 193 | path: node_modules | |
| 194 | key: node-modules-${{ hashFiles('**/bun.lock') }} | |
| 195 | restore-keys: | | |
| 196 | node-modules- | |
| 197 | ||
| 198 | - name: Install Dependencies | |
| 199 | run: bun install | |
| 200 | ||
| 201 | - name: Build artifacts | |
| 202 | run: bun run build:artifacts | |
| 203 | ||
| 204 | - name: Build application | |
| 205 | run: bun run build | |
| 206 | ||
| 207 | - name: Build documentation | |
| 208 | run: bun buddy build docs | |
| 209 | ||
| 210 | - name: Validate documentation | |
| 211 | run: bun run docs:validate | |
| 212 | ||
| 213 | - name: Validate UI accessibility | |
| 214 | run: bun run ui:validate | |
| 215 | ||
| 216 | - name: Validate responsive visual contracts | |
| 217 | run: bun run visual:validate | |
| 218 | ||
| 219 | - name: Validate production release artifact | |
| 220 | run: bun run release:validate | |
| 221 | ||
| 222 | - name: Verify generated files are current | |
| 223 | run: git diff --exit-code | |
| 224 | ||
| 178 | 225 | # Push to deploy. |
| 179 | 226 | # |
| 180 | 227 | # This job lives in CI rather than in a workflow of its own so the gates are |
| @@ -185,7 +232,7 @@ jobs: | ||
| 185 | 232 | # |
| 186 | 233 | # A red build therefore means NO deploy, silently and by construction. |
| 187 | 234 | deploy: |
| 188 | needs: [lint, typecheck, test, test-postgres] | |
| 235 | needs: [lint, typecheck, test, test-postgres, build] | |
| 189 | 236 | if: github.event_name == 'push' && github.ref == 'refs/heads/main' |
| 190 | 237 | runs-on: ubuntu-latest |
| 191 | 238 | |
| @@ -221,6 +268,12 @@ jobs: | ||
| 221 | 268 | - name: Build artifacts |
| 222 | 269 | run: bun run build:artifacts |
| 223 | 270 | |
| 271 | - name: Build application | |
| 272 | run: bun run build | |
| 273 | ||
| 274 | - name: Validate production artifact | |
| 275 | run: bun run release:validate | |
| 276 | ||
| 224 | 277 | # ts-cloud reads the PUBLIC key off disk to register it, so it is derived |
| 225 | 278 | # from the private one rather than stored as a second secret. Two secrets |
| 226 | 279 | # that have to agree eventually stop agreeing. |
| @@ -298,6 +351,9 @@ jobs: | ||
| 298 | 351 | |
| 299 | 352 | exit $fail |
| 300 | 353 | |
| 354 | - name: Verify public metadata | |
| 355 | run: bun run deployment:smoke | |
| 356 | ||
| 301 | 357 | # The same suite against Postgres, and a hard gate on the deploy. |
| 302 | 358 | # |
| 303 | 359 | # Production is Postgres and the suite defaults to SQLite, so every difference |