style: Improve formatting of theme definitions in config_patch.lua #20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches-ignore: | |
| - "ci/**" | |
| pull_request: | |
| permissions: | |
| contents: read | |
| # One active run per branch; cancel superseded runs on the same ref. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| typst-compile: | |
| name: Compile Typst sources | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Read Typst version from typst.toml | |
| id: typst-version | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| version=$(awk -F'"' '/^compiler[[:space:]]*=/ { print $2; exit }' typst.toml) | |
| [[ -n "$version" ]] || { echo "::error::compiler not found in typst.toml"; exit 1; } | |
| echo "version=$version" >> "$GITHUB_OUTPUT" | |
| - name: Set up Typst | |
| uses: typst-community/setup-typst@v5 | |
| with: | |
| typst-version: ${{ steps.typst-version.outputs.version }} | |
| - name: Prepare summary | |
| shell: bash | |
| run: | | |
| { | |
| echo "## CI: Typst compile" | |
| echo "" | |
| echo "| Section | File | Status |" | |
| echo "| ------- | ---- | ------ |" | |
| } >> "${GITHUB_STEP_SUMMARY}" | |
| - name: Compile unit tests | |
| id: unit | |
| uses: ./.github/actions/typst-compile | |
| with: | |
| label: unit | |
| glob: "tests/unit/*.typ" | |
| - name: Compile examples | |
| id: examples | |
| if: always() | |
| uses: ./.github/actions/typst-compile | |
| with: | |
| label: example | |
| glob: "examples/*.typ" | |
| - name: Totals | |
| if: always() | |
| shell: bash | |
| env: | |
| UNIT_PASSED: ${{ steps.unit.outputs.passed }} | |
| UNIT_TOTAL: ${{ steps.unit.outputs.total }} | |
| EXAMPLES_PASSED: ${{ steps.examples.outputs.passed }} | |
| EXAMPLES_TOTAL: ${{ steps.examples.outputs.total }} | |
| run: | | |
| { | |
| echo "" | |
| echo "- Unit tests: ${UNIT_PASSED:-0}/${UNIT_TOTAL:-0}" | |
| echo "- Examples: ${EXAMPLES_PASSED:-0}/${EXAMPLES_TOTAL:-0}" | |
| } >> "${GITHUB_STEP_SUMMARY}" |