Skip to content

Deliver editable worksheets, accessible reading, and validated publications #177

Deliver editable worksheets, accessible reading, and validated publications

Deliver editable worksheets, accessible reading, and validated publications #177

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [master]
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
validate:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: |
requirements-pdf.txt
requirements-audit.txt
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: "21"
- run: npm ci
- run: python -m pip install -r requirements-pdf.txt
- run: python -m pip install -r requirements-audit.txt
- run: npm audit --audit-level=high
- run: python -m pip_audit -r requirements-pdf.txt
- run: npm run check
- run: npm run book:validate -- --reports-dir outputs/epubcheck
- uses: actions/upload-artifact@v7
if: always()
with:
name: epubcheck-report
path: outputs/epubcheck/
if-no-files-found: ignore
retention-days: 14
- name: Generated files are committed
run: |
npm run sync:content
git diff --exit-code
if [[ -n "$(git ls-files --others --exclude-standard)" ]]; then
git status --short
echo 'Generated files must be committed.' >&2
exit 1
fi
- run: npm run docs:build
- uses: actions/upload-artifact@v7
with:
name: site-preview
path: docs/.vitepress/dist/
if-no-files-found: error
retention-days: 14
smoke:
runs-on: ubuntu-latest
needs: validate
timeout-minutes: 20
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- run: npm ci
- uses: actions/download-artifact@v8
with:
name: site-preview
path: docs/.vitepress/dist/
- name: Remove stale runner Chrome apt source
run: |
while IFS= read -r source; do
sudo rm -f "$source"
done < <(sudo grep -ril 'dl\.google\.com/linux/chrome' /etc/apt/sources.list.d || true)
- run: npx playwright install --with-deps chromium
- run: npm run test:smoke
env:
PLAYWRIGHT_SKIP_BUILD: "1"
- uses: actions/upload-artifact@v7
if: failure()
with:
name: playwright-report
path: playwright-report/
retention-days: 7