name: CI on: push: pull_request: permissions: contents: read jobs: check: permissions: contents: read # git >= 2.50 reports a stale old oid as "incorrect old value provided". # ply classifies that string as cas_conflict, same as git 2.43's # "failed to update ref", so the suite runs on the image's git. runs-on: ubuntu-24.04 env: CF_SEND_TELEMETRY: "false" steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: # cf needs Node ^22.23, ^24.22 or ^26.12. A bare major can resolve to an older cached release. node-version: 24.22 cache: npm # package-lock resolves ply as git+ssh. Actions has no SSH key; the repo is public. - name: Fetch GitHub git dependencies over HTTPS run: | git config --global url."https://github.com/".insteadOf "ssh://git@github.com/" git config --global url."https://github.com/".insteadOf "git+ssh://git@github.com/" git config --global url."https://github.com/".insteadOf "git@github.com:" # Annotated tags in the suite need a committer. The runner has none. Do not sign. - name: Git identity for the test suite run: | git config --global user.name "ply-web" git config --global user.email "ply-web@example.com" git config --global commit.gpgsign false - name: Absence gate run: node --experimental-strip-types scripts/absence-gate.ts - name: Absence baseline does not rise if: github.event_name == 'pull_request' env: BASE_REF: ${{ github.base_ref }} run: | set -euo pipefail git fetch --depth=1 --no-tags origin "${BASE_REF}:refs/remotes/origin/${BASE_REF}" node --experimental-strip-types scripts/absence-gate.ts --against "origin/${BASE_REF}" - run: npm ci - run: npm test - run: npm run lint - run: npm run typecheck # Builds the Worker and validates the upload without credentials or API calls. - run: npx cf deploy --dry-run actions: name: actionlint and zizmor permissions: contents: read runs-on: ubuntu-24.04 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Install actionlint run: | set -euo pipefail curl -fsSL -o /tmp/actionlint.tar.gz https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_1.7.12_linux_amd64.tar.gz echo "8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8 /tmp/actionlint.tar.gz" | sha256sum -c - tar -C /tmp -xzf /tmp/actionlint.tar.gz actionlint - name: Install zizmor run: | set -euo pipefail curl -fsSL -o /tmp/zizmor.tar.gz https://github.com/zizmorcore/zizmor/releases/download/v1.31.1/zizmor-x86_64-unknown-linux-gnu.tar.gz echo "d185f726bdaf92df78273217dfdd24ebcd6b0ef48cf3ce776ff5762b6e138c99 /tmp/zizmor.tar.gz" | sha256sum -c - mkdir -p /tmp/zizmor-extract tar -C /tmp/zizmor-extract -xzf /tmp/zizmor.tar.gz install -m 0755 /tmp/zizmor-extract/zizmor /tmp/zizmor - name: actionlint run: /tmp/actionlint - name: zizmor run: /tmp/zizmor --offline .github/workflows