Merge pull request #687 from YDX-2147483647/q #1087
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: Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| merge_group: | |
| types: [checks_requested] | |
| jobs: | |
| build-latex: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| tl-version: [2021, 2022, 2023, 2024, 2025] | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: TeX-Live/setup-texlive-action@v3 | |
| with: | |
| version: ${{ matrix.tl-version }} | |
| package-file: | | |
| .github/tl_packages | |
| ${{ matrix.tl-version < 2024 && '.github/tl_packages_compat' || '' }} | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: fd-find, ripgrep | |
| - name: Restore Microsoft fonts cache | |
| id: microsoft-fonts | |
| uses: actions/cache@v4 | |
| with: | |
| path: /usr/share/fonts/truetype/msttcorefonts | |
| key: microsoft-fonts | |
| - name: Install Microsoft fonts | |
| if: steps.microsoft-fonts.outputs.cache-hit != 'true' | |
| run: | | |
| echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | sudo debconf-set-selections | |
| sudo apt install ttf-mscorefonts-installer | |
| fc-cache --force | |
| - name: Setup TeX Live fonts | |
| run: | | |
| mkdir -p ~/.fonts | |
| ln -s $(kpsewhich -var-value=TEXMFDIST)/fonts/ ~/.fonts/texmf-dist-fonts | |
| fc-cache | |
| - run: ${{ matrix.tl-version < 2024 && 'TEST_SKIP_DOC="1"' || '' }} make test | |
| check-latex: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: TeX-Live/setup-texlive-action@v3 | |
| with: | |
| packages: | | |
| scheme-minimal | |
| xetex | |
| expltools | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: fd-find | |
| - run: make cls | |
| - run: make check | |
| check_typos: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Check spelling of bithesis.dtx | |
| uses: crate-ci/typos@master | |
| check-links: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Restore the cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: .lycheecache | |
| key: lychee-${{ github.sha }} | |
| restore-keys: lychee- | |
| - name: Check links | |
| uses: lycheeverse/lychee-action@v2 | |
| with: | |
| args: >- | |
| --verbose | |
| --no-progress | |
| --config .github/lychee.toml | |
| . | |
| check-python: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - run: pipx install ruff | |
| - name: Ruff check | |
| run: | | |
| cd scripts && ruff check --output-format=github . | |
| - name: Ruff format | |
| run: | | |
| cd scripts && ruff format --check --diff |