mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-10-24 04:25:02 +00:00
CodeQL actions/missing-workflow-permissions: chain-endpoints.yml, lock.yml, pr-any.yml, test-nightly.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.
51 lines
1.4 KiB
YAML
51 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:
|
|
# Each step reports on its own; one red step must not cancel the others.
|
|
fail-fast: false
|
|
matrix:
|
|
step: ['lint', 'test', 'build:code', 'build:i18n']
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 'lts/*'
|
|
- name: ${{ matrix.step }}
|
|
run: |
|
|
corepack enable
|
|
yarn install --immutable
|
|
yarn ${{ matrix.step }}
|
|
# `yarn lint` runs eslint --fix, build:i18n rewrites the translation
|
|
# catalogue and build:code regenerates typesBundle.ts, so each passes on a
|
|
# tree it changed. The committed tree must already be what they produce.
|
|
- name: tree unchanged
|
|
run: git diff --exit-code --stat
|
|
|
|
# The .slow. specs drive the UI against a live dev node; `yarn test` leaves
|
|
# them out, so they run here with one.
|
|
slow:
|
|
name: pr (test:slow)
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 'lts/*'
|
|
- name: dev node
|
|
run: .github/scripts/start-dev-node.sh
|
|
- name: test:slow
|
|
run: |
|
|
corepack enable
|
|
yarn install --immutable
|
|
yarn test:slow
|