chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
name: check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
lint-and-test:
|
||||
name: lint and test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
|
||||
- name: Install test extras
|
||||
run: python3 -m pip install Pygments
|
||||
|
||||
- name: Lint templates and check token sync
|
||||
run: python3 scripts/build.py --check
|
||||
|
||||
- name: Check generated Codex plugin metadata
|
||||
run: python3 scripts/build_metadata.py --check
|
||||
|
||||
- name: Run test suite
|
||||
run: python3 scripts/tests/test_build.py
|
||||
|
||||
- name: Build and audit skill package
|
||||
run: bash scripts/package-skill.sh /tmp/kami-ci.zip
|
||||
|
||||
verify-render:
|
||||
name: render and verify
|
||||
runs-on: ubuntu-latest
|
||||
needs: lint-and-test
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
|
||||
- name: Install WeasyPrint system libs and CJK fallback fonts
|
||||
# libcairo2 / libpango / libharfbuzz are required by WeasyPrint at
|
||||
# runtime; fonts-noto-cjk provides a serif CJK fallback so the Chinese
|
||||
# templates render with embedded glyphs even though TsangerJinKai02 is
|
||||
# commercial and not shipped in CI. The verify step accepts Noto as a
|
||||
# recognized fallback (see scripts/build.py fallback_present).
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
libcairo2 libpango-1.0-0 libpangoft2-1.0-0 libharfbuzz0b \
|
||||
fonts-noto-cjk fonts-noto-cjk-extra
|
||||
|
||||
- name: Install Python deps
|
||||
run: python3 -m pip install weasyprint pypdf Pygments
|
||||
|
||||
- name: Verify strict page-count targets
|
||||
# Only the six hard-invariant templates (resume == 2, one-pager == 1
|
||||
# across CN/EN/KO) run in CI. The KO pair also exercises the Korean
|
||||
# render path on Linux (fonts-noto-cjk supplies the glyphs). The
|
||||
# long-doc / portfolio / slides ceilings are soft and checked visually.
|
||||
# KAMI_ALLOW_FALLBACK_ONLY=1: CI does not ship commercial fonts
|
||||
# (TsangerJinKai02, Charter). Treat fallback-only embedding as a
|
||||
# warning instead of a failure so CI can still gate page counts.
|
||||
env:
|
||||
KAMI_ALLOW_FALLBACK_ONLY: '1'
|
||||
run: |
|
||||
python3 scripts/build.py --verify one-pager
|
||||
python3 scripts/build.py --verify one-pager-en
|
||||
python3 scripts/build.py --verify one-pager-ko
|
||||
python3 scripts/build.py --verify resume
|
||||
python3 scripts/build.py --verify resume-en
|
||||
python3 scripts/build.py --verify resume-ko
|
||||
Reference in New Issue
Block a user