mirror of
https://github.com/pezkuwichain/pezkuwi-api.git
synced 2026-10-21 03:06:20 +00:00
CodeQL actions/missing-workflow-permissions: lock.yml, pr-any.yml, push-master.yml had no permissions block, so their jobs received the repository default token. Read-only where nothing writes through GITHUB_TOKEN; lock-threads gets the issues/pull-requests/discussions write it documents; workflows that write do it with a separate bot or app token, so GITHUB_TOKEN stays read-only.
44 lines
1.4 KiB
YAML
44 lines
1.4 KiB
YAML
name: PR
|
|
on: [pull_request]
|
|
|
|
|
|
# Read-only token: no step writes through GITHUB_TOKEN.
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
pr:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
step: ['lint', 'test', 'build']
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
YARN_ENABLE_SCRIPTS: false
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 'lts/*'
|
|
- name: ${{ matrix.step }}
|
|
if: always()
|
|
run: |
|
|
yarn install --immutable
|
|
yarn ${{ matrix.step }}
|
|
# `yarn lint` runs eslint --fix and `yarn build` regenerates the augment
|
|
# interfaces, so both pass on a tree they rewrote. The committed tree must
|
|
# already be what they produce.
|
|
- name: tree unchanged
|
|
run: git diff --exit-code --stat
|
|
# The package.json each build/ directory holds is what npm receives: every
|
|
# entry point must name a file that is there, with no ./build/ or ./cjs/cjs/
|
|
# path and no string spread into exports (the January 2026 fault).
|
|
- name: check built manifests
|
|
if: matrix.step == 'build'
|
|
run: python3 scripts/check-built-manifests.py .
|
|
# The four polkadot-api packages ship committed dist/ builds; their source
|
|
# maps must embed exactly the src/ committed beside them.
|
|
- name: check papi sources
|
|
if: matrix.step == 'lint'
|
|
run: node scripts/check-papi-sources.mjs
|