Skip to content

Restore the original 1 W solar repeater build guide (#92) #47

Restore the original 1 W solar repeater build guide (#92)

Restore the original 1 W solar repeater build guide (#92) #47

Workflow file for this run

name: Validate site quality
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: site-quality-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
validate:
runs-on: ubuntu-latest
timeout-minutes: 35
steps:
- name: Checkout repository
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: "3.13"
cache: pip
cache-dependency-path: |
requirements-docs.txt
scripts/requirements-regions.txt
tools/region-proposal-gateway/requirements.txt
- name: Set up Node
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: "22"
cache: npm
- name: Install locked dependencies
run: |
python -m pip install -r requirements-docs.txt
python -m pip install -r scripts/requirements-regions.txt
python -m pip install -r tools/region-proposal-gateway/requirements.txt
npm ci
- name: Enforce source and production boundaries
shell: bash
run: |
set -euo pipefail
test -z "$(git ls-files site)"
if git grep -n -E 'canadaverse\.org|regions-api\.meshcore\.ca|/api/meshcore-regions/proposals|192\.168\.0\.(24|111)|/home/neonx|splashpage' -- \
docs/config/editor docs/javascripts docs/submit-idea.md \
tools/region-proposal-gateway instructions.md; then
echo 'Production submission files contain staging infrastructure.' >&2
exit 1
fi
- name: Validate content and generated directories
run: |
python scripts/validate-content.py
python scripts/validate-communities.py
python scripts/validate_community_submission.py
python -m unittest discover -s tests/content -p "test_*.py" -v
npm run test:content
- name: Validate region authority and proposal automation
run: |
node scripts/validate-regions.cjs
python scripts/verify-region-geometry.py
python scripts/verify-region-geometry.py --partition docs/assets/regions/canada-region-partition-digital.geojson
python -m unittest discover -s tools/region-proposal-gateway/tests -v
python -m unittest discover -s tests/automation -v
npm run test:editor
- name: Check browser JavaScript syntax
shell: bash
run: |
set -euo pipefail
for file in docs/config/editor/*.js docs/assets/javascripts/*.js docs/assets/regions/modules/*.js docs/assets/regions/regions.js; do
node --check "$file"
done
- name: Build and audit local links
run: npm run check:links
- name: Check patch hygiene
run: git diff --check
browser:
needs: validate
runs-on: ubuntu-latest
timeout-minutes: 35
steps:
- name: Checkout repository
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: "3.13"
cache: pip
cache-dependency-path: requirements-docs.txt
- name: Set up Node
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: "22"
cache: npm
- name: Install site and browser dependencies
run: |
python -m pip install -r requirements-docs.txt
npm ci
npx playwright install --with-deps chromium firefox webkit
- name: Build site
run: npm run docs:build
- name: Run critical journeys and accessibility checks
run: npm run test:browser
lighthouse:
needs: validate
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- name: Checkout repository
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: "3.13"
cache: pip
cache-dependency-path: requirements-docs.txt
- name: Set up Node
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: "22"
cache: npm
- name: Install locked dependencies
run: |
python -m pip install -r requirements-docs.txt
npm ci
- name: Enforce Lighthouse budgets
shell: bash
run: |
export CHROME_PATH="$(command -v google-chrome || command -v google-chrome-stable)"
npm run audit:lighthouse
- name: Save Lighthouse reports
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: lighthouse-reports
path: .tmp/lighthouse/*.json
retention-days: 7