docs(web/guides): fix auth-patterns format check and hasStrategy rationale #174
Workflow file for this run
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: Verify docs | |
| on: | |
| pull_request: | |
| branches: [develop] | |
| paths: | |
| - 'web/sites/guides/src/content/docs/v4-0-0/**' | |
| - 'web/sites/guides/scripts/verify-docs/**' | |
| - 'web/sites/guides/package.json' | |
| - 'web/sites/guides/src/sidebars/v4-0-0.json' | |
| - '.github/workflows/docs-verify.yml' | |
| jobs: | |
| verify: | |
| # ubuntu-latest with Linuxbrew. Was macos-latest, but Node 22's test-runner | |
| # workers on macos-latest ARM64 have a broken child_process.spawn: ENOENT | |
| # on every exec, even /bin/bash, even with absolute paths that statSync | |
| # confirms exist. Direct `node -e "spawn('wheels')"` works fine; only | |
| # --test worker contexts fail. The wheels formula supports Linux via the | |
| # same install flow, and Linux posix_spawn is unaffected. | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@v5 | |
| with: | |
| version: 10.23.0 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| cache-dependency-path: web/pnpm-lock.yaml | |
| - name: Install Node deps | |
| working-directory: web | |
| run: pnpm install --frozen-lockfile | |
| - name: Set up Linuxbrew | |
| uses: Homebrew/actions/setup-homebrew@master | |
| - name: Install Wheels CLI | |
| env: | |
| # Homebrew 5.x's Linux sandbox needs a rootless bwrap, which | |
| # ubuntu-latest runners don't provide (and 24.04's unprivileged | |
| # userns restrictions make it unreliable even when installed). | |
| # The ephemeral runner is already isolation enough for CI. | |
| HOMEBREW_NO_SANDBOX_LINUX: "1" | |
| run: | | |
| brew tap wheels-dev/wheels || true | |
| # Homebrew 5.1+ refuses to load formulae from untrusted third-party | |
| # taps; trust must be granted explicitly (no-op on older brew). | |
| brew trust wheels-dev/wheels || true | |
| brew install wheels | |
| - name: Patch wheels wrapper JAVA_HOME for Linux | |
| # The homebrew formula's wrapper hardcodes a macOS bundle path: | |
| # JAVA_HOME="...openjdk@21/libexec/openjdk.jdk/Contents/Home" | |
| # On Linux, openjdk@21's opt_libexec IS the JAVA_HOME directly (no | |
| # macOS bundle nesting). Strip the trailing bundle path so the | |
| # wrapper's inner exec of $JAVA_HOME/bin/java resolves. | |
| # Follow-up: fix the formula to branch the export on OS. | |
| run: | | |
| WRAPPER="$(brew --prefix wheels)/bin/wheels" | |
| sed -i 's|/openjdk.jdk/Contents/Home||g' "$WRAPPER" | |
| grep JAVA_HOME "$WRAPPER" | |
| - name: Smoke-test the CLI (binary attestation) | |
| # Binary attestation (#3042): this workflow installs the RELEASED | |
| # brew CLI, so {test:cli}/{test:compile}/{test:tutorial} blocks | |
| # attest to that release — not a CLI built from this checkout. | |
| # verify-docs.mjs prints the same "wheels binary: <path> ... " line | |
| # at run start. To attest to a branch-built CLI instead, export | |
| # WHEELS_BIN pointing at it (not wired up yet — issue #3042 tracks | |
| # building the CLI from the checkout here). | |
| run: | | |
| command -v wheels | |
| wheels --version | |
| - name: Warm up wheels module (first-run copy) | |
| # Homebrew wrapper copies the module to $HOME/.wheels/modules/wheels | |
| # on first invocation. Trigger it so the module is in place before | |
| # the harness spawns `wheels`. | |
| run: wheels --version >/dev/null | |
| - name: Run harness unit tests | |
| working-directory: web/sites/guides | |
| # Runs on Node 22 (no longer pinned to Node 20). The "spawn ENOENT" | |
| # that looked like a Node 22 posix_spawn regression was actually | |
| # caused by `wheels new` exiting 0 after a framework-not-found | |
| # error, leaving the fixture cwd missing; Node's spawn then reports | |
| # ENOENT against the program instead of the cwd. Setting | |
| # WHEELS_FRAMEWORK_PATH at the checked-out repo's vendor/wheels | |
| # lets `wheels new` succeed, which makes fixture cwds real. See | |
| # #2178 for the full root-cause write-up. | |
| # | |
| # Still soft-fail: surfaces the remaining tutorial-driver fixture | |
| # issues (e.g., blog-tutorial's lucee.json emission). Drop | |
| # continue-on-error once those are fixed. | |
| continue-on-error: true | |
| env: | |
| WHEELS_FRAMEWORK_PATH: ${{ github.workspace }}/vendor/wheels | |
| run: | | |
| export LUCLI_HOME="$HOME/.wheels" | |
| pnpm test:docs-harness | |
| - name: Verify v4 docs | |
| working-directory: web/sites/guides | |
| # Soft-fail: at 290 tagged blocks / 4-way concurrency, LuCLI's | |
| # lucee.json writer + concurrent JVM startup races cause ~24 | |
| # blocks to consistently ENOENT even with in-driver retries and | |
| # concurrency caps. Tracked as framework gap #11 (atomic | |
| # lucee.json write upstream). 266/290 pass reliably; the | |
| # remaining 24 are infrastructure flakes, not content regressions. | |
| # Until the upstream fix ships, local `pnpm verify:docs` is the | |
| # canonical content gate (it runs serially and passes 290/290). | |
| continue-on-error: true | |
| run: | | |
| export LUCLI_HOME="$HOME/.wheels" | |
| pnpm verify:docs | |
| - name: Build guides site | |
| working-directory: web/sites/guides | |
| run: pnpm build |