Align Fastly staging store selectors with EdgeZero PR 381 #3480
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: "Run Format" | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| check-claude-md-symlink: | |
| name: CLAUDE.md symlink guard | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # AGENTS.md is the source of truth and CLAUDE.md must stay a symlink to | |
| # it. A checkout with core.symlinks=false (the Git for Windows default) | |
| # materializes the symlink as a plain text file containing "AGENTS.md"; | |
| # if that file is committed, agents silently load it as the entire | |
| # project instructions. Guard the tree entry so the broken form cannot | |
| # land (see issue #1091). | |
| - name: Verify CLAUDE.md is a symlink to AGENTS.md | |
| shell: bash | |
| run: | | |
| mode=$(git ls-tree HEAD CLAUDE.md | awk '{print $1}') | |
| if [ "$mode" != "120000" ]; then | |
| echo "::error file=CLAUDE.md::CLAUDE.md must be a symlink to AGENTS.md (tree mode 120000), found mode ${mode:-<missing>}. This usually means a checkout with core.symlinks=false committed the materialized text file; re-add the symlink with core.symlinks=true." | |
| exit 1 | |
| fi | |
| target=$(git cat-file blob HEAD:CLAUDE.md) | |
| if [ "$target" != "AGENTS.md" ]; then | |
| echo "::error file=CLAUDE.md::CLAUDE.md must point at AGENTS.md, found '${target}'." | |
| exit 1 | |
| fi | |
| if [ ! -f AGENTS.md ]; then | |
| echo "::error file=AGENTS.md::CLAUDE.md points at AGENTS.md, but AGENTS.md does not exist." | |
| exit 1 | |
| fi | |
| format-rust: | |
| name: cargo fmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Retrieve Rust version | |
| id: rust-version | |
| run: echo "rust-version=$(grep '^rust ' .tool-versions | awk '{print $2}')" >> $GITHUB_OUTPUT | |
| shell: bash | |
| - name: Set up rust toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: ${{ steps.rust-version.outputs.rust-version }} | |
| target: wasm32-wasip1,wasm32-unknown-unknown | |
| components: "clippy, rustfmt" | |
| cache-shared-key: cargo-${{ runner.os }} | |
| - name: Run cargo fmt | |
| uses: actions-rust-lang/rustfmt@v1 | |
| - name: Run cargo clippy (Fastly — wasm32-wasip1) | |
| run: cargo clippy-fastly | |
| - name: Run cargo clippy (Axum — native) | |
| run: cargo clippy-axum | |
| - name: Run cargo clippy (Cloudflare — native) | |
| run: cargo clippy-cloudflare | |
| - name: Run cargo clippy (Cloudflare — wasm32-unknown-unknown) | |
| run: cargo clippy-cloudflare-wasm | |
| - name: Run cargo clippy (Spin — native) | |
| run: cargo clippy-spin-native | |
| - name: Run cargo clippy (Spin — wasm32-wasip1) | |
| run: cargo clippy-spin-wasm | |
| - name: Run host-target CLI clippy | |
| run: cargo clippy --package trusted-server-cli --target x86_64-unknown-linux-gnu --all-targets --all-features -- -D warnings | |
| # The codegen crate is a workspace member but is not a default member and | |
| # is not covered by any adapter-scoped alias, so lint it explicitly. | |
| - name: Run host-target OpenRTB codegen clippy | |
| run: cargo clippy --package trusted-server-openrtb-codegen --target x86_64-unknown-linux-gnu --all-targets -- -D warnings | |
| format-typescript: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: crates/trusted-server-js/lib | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Retrieve Node.js version | |
| id: node-version | |
| working-directory: . | |
| run: echo "node-version=$(grep '^nodejs ' .tool-versions | awk '{print $2}')" >> $GITHUB_OUTPUT | |
| shell: bash | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ steps.node-version.outputs.node-version }} | |
| cache: "npm" | |
| cache-dependency-path: crates/trusted-server-js/lib/package.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run ESLint | |
| run: npm run lint | |
| - name: Run Prettier (check) | |
| run: npm run format | |
| format-docs: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: docs | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Retrieve Node.js version | |
| id: node-version | |
| working-directory: . | |
| run: echo "node-version=$(grep '^nodejs ' .tool-versions | awk '{print $2}')" >> $GITHUB_OUTPUT | |
| shell: bash | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ steps.node-version.outputs.node-version }} | |
| cache: "npm" | |
| cache-dependency-path: docs/package.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run ESLint | |
| run: npm run lint | |
| - name: Run Prettier (check) | |
| run: npm run format | |
| - name: Build with VitePress (fails on dead links) | |
| run: npm run build |