Spaces:
Running
Running
| name: Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| packages: read | |
| jobs: | |
| test: | |
| name: Run tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| # CI-HYGIENE 2026-06-03: pnpm/action-setup removed — pnpm is not a GitHub-verified | |
| # marketplace creator (isVerifiedOwner=false) and is blocked by the szl-holdings org | |
| # allowed_actions policy (github_owned_allowed=true, verified_allowed=true, | |
| # patterns_allowed=[]). Replaced with corepack (Node.js built-in, no external action) | |
| # and npm scripts. Node.js setup uses github-owned actions/setup-node only. | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Enable corepack and install pnpm 10.33.3 | |
| run: | | |
| corepack enable | |
| corepack install -g pnpm@10.33.3 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install policy package deps (published @szl-holdings/a11oy-receipt-substrate from GHCR) | |
| working-directory: packages/policy | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| # packages/policy is not a pnpm-workspace member, so the root install does not | |
| # link its runtime dep. The policy gate test transitively imports gates/receipt.ts | |
| # which now imports the published @szl-holdings/a11oy-receipt-substrate. Install it | |
| # in-place (package-local .npmrc points @szl-holdings at npm.pkg.github.com). | |
| npm install --no-save --no-package-lock | |
| - name: Run policy gate tests | |
| run: npm run test:policy-gates | |