diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c54fa308..b1c14c5e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,3 +61,28 @@ jobs: turbo-${{ runner.os }}- - name: Gate run: ${{ matrix.gate }} + + journeys: + name: journeys + runs-on: ubuntu-latest + timeout-minutes: 30 + env: + CI: "true" + steps: + - uses: actions/checkout@v7 + - uses: cachix/install-nix-action@v31 + - uses: pnpm/setup@v2 + with: + runtime: node@24 + cache: true + - run: pnpm install --frozen-lockfile + - name: Journeys against pnpm dev + run: pnpm journeys + - if: always() + uses: actions/upload-artifact@v6 + with: + name: journeys + path: | + apps/site-e2e/artifacts/ + .journeys/dev.log + if-no-files-found: ignore diff --git a/.gitignore b/.gitignore index 5d4eba62..79922006 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ apps/site/.wrangler/ apps/site/src/routeTree.gen.ts apps/site/.tanstack/ apps/site-e2e/artifacts/ +.journeys/ diff --git a/AGENTS.md b/AGENTS.md index 86bf3614..db6de2ee 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -20,6 +20,7 @@ Starter template for TypeScript / Effect libraries and tools. | `START-2` | Typechecking succeeds workspace-wide with no errors | `pnpm typecheck` | | `START-3` | All test suites pass | `pnpm test` | | `START-4` | Full CI validation passes before completion | `pnpm check:ci` | +| `START-5` | The e2e journeys pass against `pnpm dev` | `pnpm journeys` | Workspace roots: `packages/` holds libraries, `apps/` holds publishable applications — both are workspace globs in `pnpm-workspace.yaml`. Turbo declares diff --git a/apps/site/alchemy.run.ts b/apps/site/alchemy.run.ts index ac218217..216141f0 100644 --- a/apps/site/alchemy.run.ts +++ b/apps/site/alchemy.run.ts @@ -7,6 +7,7 @@ import { siteWorker } from './site-worker.ts' export const Site = Cloudflare.Website.Vite('Site', { main: siteWorker.main, compatibility: { date: siteWorker.compatibilityDate, flags: [...siteWorker.compatibilityFlags] }, + dev: { port: 1337, strictPort: true }, }) export default Alchemy.Stack( diff --git a/bin/journeys b/bin/journeys new file mode 100755 index 00000000..ca1463ef --- /dev/null +++ b/bin/journeys @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +# Start the app with pnpm dev, run the e2e journeys against it, then stop it. +# A red run prints the tail of the dev server's log. +set -uo pipefail +# Job control gives pnpm dev its own process group, so one SIGINT reaches +# alchemy dev and lets it stop its local sidecar instead of orphaning it. +set -m + +cd "$(dirname "${BASH_SOURCE[0]}")/.." || exit 1 + +readonly site=http://localhost:1337 +readonly log=.journeys/dev.log +mkdir -p .journeys + +pnpm dev >"$log" 2>&1 & +readonly dev=$! + +status=0 +curl -sS -o /dev/null --retry 90 --retry-delay 2 --retry-all-errors --max-time 5 "$site/" || status=1 +[ "$status" = 0 ] && { SITE_URL=$site pnpm --filter @endgame/site-e2e journeys || status=1; } +[ "$status" = 0 ] || { echo "--- last 60 lines of pnpm dev ---"; tail -n 60 "$log"; } +kill -INT -- "-$dev" 2>/dev/null +wait "$dev" 2>/dev/null +exit "$status" diff --git a/package.json b/package.json index b8a10dce..1f388fa7 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,8 @@ "typecheck": "turbo --concurrency=${TURBO_CONCURRENCY:-50%} --continue typecheck typecheck:node", "typecheck:node": "tsc -p tsconfig.node.json --noEmit", "test:scripts": "nix develop --command deno test --config=scripts/deno.json --allow-read --allow-write --allow-import=jsr.io scripts/", - "dev": "pnpm --filter @endgame/site dev" + "dev": "pnpm --filter @endgame/site dev", + "journeys": "./bin/journeys" }, "type": "module" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ec8566b8..1971a204 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -186,8 +186,8 @@ catalogs: specifier: 21.2.3 version: 21.2.3 '@effect/tsgo': - specifier: 0.50.0 - version: 0.50.0 + specifier: 0.51.0 + version: 0.51.0 '@rolldown/plugin-babel': specifier: 0.2.4 version: 0.2.4 @@ -303,7 +303,7 @@ importers: version: 21.2.3 '@effect/tsgo': specifier: 'catalog:' - version: 0.50.0 + version: 0.51.0 '@systemfsoftware/oxlint-config-recommended': specifier: 'catalog:' version: 4.0.0(effect@4.0.1)(oxlint-tsgolint@7.0.2001)(oxlint@1.82.0(oxlint-tsgolint@7.0.2001))(typescript@7.0.2) @@ -993,8 +993,8 @@ packages: cpu: [arm64] os: [darwin] - '@effect/tsgo-darwin-arm64@0.50.0': - resolution: {integrity: sha512-CtpXnQbf2BXavXeY3g/LZinyXWEsMftVcbla0zbwe4HiGqueUaacCqI1HTGZ2JUFYo/3M5MsnFFe2VCWW0wj4w==} + '@effect/tsgo-darwin-arm64@0.51.0': + resolution: {integrity: sha512-IsVT2Z7hNGT6RCLbNP/lyLyyjC9arVblfoXbr3qt3cF0A364BigXnoKx+NGm6ZNfg5NozW2NGKW2AD9btcy13Q==} cpu: [arm64] os: [darwin] @@ -1003,8 +1003,8 @@ packages: cpu: [x64] os: [darwin] - '@effect/tsgo-darwin-x64@0.50.0': - resolution: {integrity: sha512-SC3Tk1nDtjUA+UYg3qyyKUz62/mhpPOdhL9HmBBI+Cksg3XXjYw8cenmDT24yJKiwFxO3AbYQ0siXy3QrYaOdQ==} + '@effect/tsgo-darwin-x64@0.51.0': + resolution: {integrity: sha512-S0k97HUL7vS9a1CZFcZEUeOK/6fYuev06li7+canKpn9w1PAp+YtxrET3r37ZdHeZP7w/WYJtT0yxxLZO7Mprw==} cpu: [x64] os: [darwin] @@ -1013,8 +1013,8 @@ packages: cpu: [arm64] os: [linux] - '@effect/tsgo-linux-arm64@0.50.0': - resolution: {integrity: sha512-u6oBSeK9bL7Ta5OJX/v92AErjl+9YQXZuHPuWGsajia6cV2IpyR5UwbOX2ekk4V2QhVpSzmSIYVIEkq9jOL6Pg==} + '@effect/tsgo-linux-arm64@0.51.0': + resolution: {integrity: sha512-2KSJiPO3foagMgBuKhUBhO9X+JLHeJ/+2FzrwxQhexhR6V3LUnJ2L2hJS3KGs/sMn4TJjjtgczO8mAmIrFaffw==} cpu: [arm64] os: [linux] @@ -1023,8 +1023,8 @@ packages: cpu: [arm] os: [linux] - '@effect/tsgo-linux-arm@0.50.0': - resolution: {integrity: sha512-qLJdYvGw4mrMrjonhqzSkwByR4X5SlUhG2Pg0LIlKVSy21B0RxLQ2Sg1Re90XpwQCcFCV1byoqW4QLT6A1YDcQ==} + '@effect/tsgo-linux-arm@0.51.0': + resolution: {integrity: sha512-4FUwHI8G1Fbpa3nPBfR9143mK0ziLjfa+/RVzbr9VIfSF0FWEYHJzD7A3RGNEh0EXZ9ZQG+UKmfs9kKRhWOvyw==} cpu: [arm] os: [linux] @@ -1033,8 +1033,8 @@ packages: cpu: [x64] os: [linux] - '@effect/tsgo-linux-x64@0.50.0': - resolution: {integrity: sha512-x7Xz7IPP/4CKHaWk58tm+LpgMPAwNXGQcLXZAkWUoarjcXzrDG3QCoEjnIpCRSzL7O8ykShApgGcYv0Pd2tJkA==} + '@effect/tsgo-linux-x64@0.51.0': + resolution: {integrity: sha512-Psolf3poNm3PVHm/Q2Q66cXQ17ZIBLhtPJoKMvEIrlbAJmHMWfQyKeUrtRfum6V+yDTy6ZTeO6ksUfk0hg2YwA==} cpu: [x64] os: [linux] @@ -1043,8 +1043,8 @@ packages: cpu: [arm64] os: [win32] - '@effect/tsgo-win32-arm64@0.50.0': - resolution: {integrity: sha512-VK3PTybFLmwKI50FMcNeX1LpPv9m55coKv+PKLj7gkb91YZIUooQ7hQJdSUhiuCTaUU3kikHQpnW7UbN9q4zDw==} + '@effect/tsgo-win32-arm64@0.51.0': + resolution: {integrity: sha512-V+BiYnc75s30F62CQO2NtTFiaG0tYpBcVbIIvoiRBVuHUy68RDCXVQWqSNG6JkohTIabObPmvk4bznCLbcGvPQ==} cpu: [arm64] os: [win32] @@ -1053,8 +1053,8 @@ packages: cpu: [x64] os: [win32] - '@effect/tsgo-win32-x64@0.50.0': - resolution: {integrity: sha512-ANbPqHKT/owJ9vIjyOWai+vO0IZAKZd3nN6QlPBBJyHe5BWMjz+MpntNwGxSvvp2PTMb4ZPBLQ2ixh4c9IMOMg==} + '@effect/tsgo-win32-x64@0.51.0': + resolution: {integrity: sha512-sO2Ngbdxn6DrDdSCItXu/J5ha7PgFGyY7U1qJ4VzMyovazguiVJfkExskZ174Qa+ltPWZIGHFY/QdVZwHepOTw==} cpu: [x64] os: [win32] @@ -1062,8 +1062,8 @@ packages: resolution: {integrity: sha512-gPG0ixVHgtYBUe5DbKX9vzHlhqd9+ZEfs4m/XWy0808av0A2XqMzaG3F5rnPBN7EUJRPlo9TluIi8WHx/pBV+A==} hasBin: true - '@effect/tsgo@0.50.0': - resolution: {integrity: sha512-BCRwWFBVfQGhFPXmLlNCbYhohTPoIzCL+0iSrDkSpSN2TRtGbbxCB1Mi4oBPr1jRk5VgMB0jOFEvXmPt3SqCDg==} + '@effect/tsgo@0.51.0': + resolution: {integrity: sha512-USDPT8AJCq1xc8+C8gyroohI0aJ9SZmmnSQRUEKzEMiBMJFpVuadXKqkHQ1DGOwZDeu2NDz/tLXxDD/vtel1bA==} hasBin: true '@electric-sql/pglite-socket@0.0.20': @@ -5305,43 +5305,43 @@ snapshots: '@effect/tsgo-darwin-arm64@0.45.0': optional: true - '@effect/tsgo-darwin-arm64@0.50.0': + '@effect/tsgo-darwin-arm64@0.51.0': optional: true '@effect/tsgo-darwin-x64@0.45.0': optional: true - '@effect/tsgo-darwin-x64@0.50.0': + '@effect/tsgo-darwin-x64@0.51.0': optional: true '@effect/tsgo-linux-arm64@0.45.0': optional: true - '@effect/tsgo-linux-arm64@0.50.0': + '@effect/tsgo-linux-arm64@0.51.0': optional: true '@effect/tsgo-linux-arm@0.45.0': optional: true - '@effect/tsgo-linux-arm@0.50.0': + '@effect/tsgo-linux-arm@0.51.0': optional: true '@effect/tsgo-linux-x64@0.45.0': optional: true - '@effect/tsgo-linux-x64@0.50.0': + '@effect/tsgo-linux-x64@0.51.0': optional: true '@effect/tsgo-win32-arm64@0.45.0': optional: true - '@effect/tsgo-win32-arm64@0.50.0': + '@effect/tsgo-win32-arm64@0.51.0': optional: true '@effect/tsgo-win32-x64@0.45.0': optional: true - '@effect/tsgo-win32-x64@0.50.0': + '@effect/tsgo-win32-x64@0.51.0': optional: true '@effect/tsgo@0.45.0': @@ -5354,15 +5354,15 @@ snapshots: '@effect/tsgo-win32-arm64': 0.45.0 '@effect/tsgo-win32-x64': 0.45.0 - '@effect/tsgo@0.50.0': + '@effect/tsgo@0.51.0': optionalDependencies: - '@effect/tsgo-darwin-arm64': 0.50.0 - '@effect/tsgo-darwin-x64': 0.50.0 - '@effect/tsgo-linux-arm': 0.50.0 - '@effect/tsgo-linux-arm64': 0.50.0 - '@effect/tsgo-linux-x64': 0.50.0 - '@effect/tsgo-win32-arm64': 0.50.0 - '@effect/tsgo-win32-x64': 0.50.0 + '@effect/tsgo-darwin-arm64': 0.51.0 + '@effect/tsgo-darwin-x64': 0.51.0 + '@effect/tsgo-linux-arm': 0.51.0 + '@effect/tsgo-linux-arm64': 0.51.0 + '@effect/tsgo-linux-x64': 0.51.0 + '@effect/tsgo-win32-arm64': 0.51.0 + '@effect/tsgo-win32-x64': 0.51.0 '@electric-sql/pglite-socket@0.0.20(@electric-sql/pglite@0.3.15)': dependencies: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index a0c8a8f7..a8c849e8 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -13,7 +13,7 @@ catalog: "@commitlint/cli": 21.2.3 "@commitlint/config-conventional": 21.2.3 "@commitlint/types": 21.2.3 - "@effect/tsgo": 0.50.0 + "@effect/tsgo": 0.51.0 "@rolldown/plugin-babel": 0.2.4 "@systemfsoftware/effect-gherkin-spec": 7.0.1 "@systemfsoftware/oxlint-config-recommended": 4.0.0 diff --git a/release.jsonc b/release.jsonc index 50ed94a7..301ea8c1 100644 --- a/release.jsonc +++ b/release.jsonc @@ -7,8 +7,8 @@ "branch": "changeset-release/main", "versioning": { // Each workspace package owns its version in its own package.json; the - // release delegates to `pnpm version -r`, as the deleted local tooling did. - "strategy": "pnpm", + // changesets libraries bump each package from the pending intents. + "strategy": "changesets", }, // Turbo's task graph decides which packages a change touches, so an intent is // required for exactly the publishable packages a PR actually affects. diff --git a/turbo.json b/turbo.json index 6d71860a..9529723f 100644 --- a/turbo.json +++ b/turbo.json @@ -82,7 +82,7 @@ "!**/AGENTS.md", "!**/CHANGELOG.md" ], - "outputLogs": "errors-only", + "outputLogs": "new-only", "dependsOn": [ "^build", "build"