mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-12-02 10:09:02 +01:00
Matching Markdown mirrors can still break assertions in the in-app Help renderer. Run the existing Help and link suites inside the Public docs verdict when guide inputs change or the comparison base is unavailable, without admitting a full application build for a prose-only change. Change-source: pulse-maintainer
136 lines
4.7 KiB
YAML
136 lines
4.7 KiB
YAML
name: Public docs
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "*.md"
|
|
- "docs/**"
|
|
- "frontend-modern/public/docs/**"
|
|
- ".github/ISSUE_TEMPLATE/**"
|
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
|
- "scripts/check_public_docs.py"
|
|
- "scripts/check_docs_mirror.py"
|
|
- "scripts/readme_entrypoints_test.py"
|
|
- "scripts/tests/**"
|
|
- "scripts/select-smoke-test-shard.py"
|
|
- ".github/scripts/docs-test-seconds.txt"
|
|
- "scripts/test-vm-disk.sh"
|
|
- ".github/workflows/public-docs.yml"
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "*.md"
|
|
- "docs/**"
|
|
- "frontend-modern/public/docs/**"
|
|
- ".github/ISSUE_TEMPLATE/**"
|
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
|
- "scripts/check_public_docs.py"
|
|
- "scripts/check_docs_mirror.py"
|
|
- "scripts/readme_entrypoints_test.py"
|
|
- "scripts/tests/**"
|
|
- "scripts/select-smoke-test-shard.py"
|
|
- ".github/scripts/docs-test-seconds.txt"
|
|
- "scripts/test-vm-disk.sh"
|
|
- ".github/workflows/public-docs.yml"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: public-docs-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
recipes:
|
|
name: Documentation recipes (${{ matrix.shard }})
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 10
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
shard: [0, 1, 2, 3]
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
# Build and Test skips smoke for docs-only changes. Discover the complete
|
|
# current docs suite here, including privacy, authentication and recovery.
|
|
# Measured whole-suite scheduling retains sorted, isolated execution and
|
|
# every recipe deadline; timing hints cannot add or omit coverage.
|
|
- name: Exercise documentation safety and diagnostic recipes
|
|
run: scripts/tests/run.sh --docs-shard "${{ matrix.shard }}"
|
|
|
|
# Preserve the existing required check name and fail closed on every shard.
|
|
check:
|
|
needs: recipes
|
|
if: ${{ always() }}
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 10
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
fetch-depth: 2
|
|
|
|
- name: Require every documentation recipe shard
|
|
env:
|
|
RECIPE_RESULT: ${{ needs.recipes.result }}
|
|
run: |
|
|
if [[ "$RECIPE_RESULT" != success ]]; then
|
|
echo "Documentation recipe shards did not all succeed: $RECIPE_RESULT" >&2
|
|
exit 1
|
|
fi
|
|
|
|
- name: Validate public documentation
|
|
run: python3 scripts/check_public_docs.py
|
|
|
|
- name: Check getting-started safety and current plans
|
|
run: python3 scripts/readme_entrypoints_test.py
|
|
|
|
- name: Check shipped docs mirror sync
|
|
run: python3 scripts/check_docs_mirror.py
|
|
|
|
- name: Check documentation safety workflow contract
|
|
run: python3 scripts/tests/test_public_docs_workflow.py
|
|
|
|
# A byte-identical guide can still break a rendered Help assertion.
|
|
# Build and Test skips its unit job for Markdown-only diffs. Exercise the
|
|
# existing Help suites here without a bundle build or dependency audit.
|
|
- name: Detect in-app Help changes
|
|
id: help
|
|
env:
|
|
BASE_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}
|
|
run: |
|
|
if [[ "$BASE_SHA" =~ ^[0-9a-f]{40}$ ]] &&
|
|
git diff --quiet --no-ext-diff --no-renames "$BASE_SHA" HEAD -- \
|
|
':(glob)docs/*.md' frontend-modern/public/docs \
|
|
ARCHITECTURE.md CONTRIBUTING.md SECURITY.md TERMS.md \
|
|
.github/workflows/public-docs.yml; then
|
|
echo "required=false" >> "$GITHUB_OUTPUT"
|
|
else
|
|
# A missing or unreachable comparison base is not a clean diff.
|
|
echo "required=true" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
- name: Set up Node.js for Help assertions
|
|
if: steps.help.outputs.required != 'false'
|
|
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
|
with:
|
|
node-version: '24'
|
|
cache: npm
|
|
cache-dependency-path: frontend-modern/package-lock.json
|
|
|
|
- name: Install locked Help test dependencies
|
|
if: steps.help.outputs.required != 'false'
|
|
working-directory: frontend-modern
|
|
run: npm ci --no-audit --no-fund
|
|
|
|
- name: Check in-app Help content and links
|
|
if: steps.help.outputs.required != 'false'
|
|
working-directory: frontend-modern
|
|
run: npm run test -- src/features/docs/__tests__ src/utils/__tests__/docsLinks.test.ts
|