docs(contrib): update checking and saving steps #32
This file contains 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
# Based on https://github.com/CTeX-org/ctex-kit/blob/master/.github/workflows/test.yml | |
name: Test suite | |
on: | |
pull_request: | |
types: | |
# added "ready_for_review" | |
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request | |
[opened, ready_for_review, reopened, synchronize] | |
push: | |
schedule: | |
# at 12:21 UTC (20:21 CST/UTC +8) on every Friday | |
- cron: "21 12 * * 5" | |
workflow_dispatch: | |
jobs: | |
tests-new: | |
strategy: | |
matrix: | |
format: [latex, latex-dev] | |
name: ${{ format('Tests ({0})', matrix.format) }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup TeX Live | |
uses: teatimeguest/setup-texlive-action@v3 | |
with: | |
package-file: .github/workflows/texlive.package | |
update-all-packages: true | |
- name: Run tests | |
run: | | |
l3build check -cbuild --halt-on-error --show-saves \ | |
${{ matrix.format == 'latex-dev' && '--dev' || '' }} | |
tests-old: | |
strategy: | |
matrix: | |
format: [latex, latex-dev] | |
name: ${{ format('Old tests ({0})', matrix.format) }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup TeX Live | |
uses: teatimeguest/setup-texlive-action@v3 | |
with: | |
package-file: .github/workflows/texlive.package | |
update-all-packages: true | |
- name: Install pdftoppm | |
run: | | |
sudo apt-get install poppler-utils | |
# note: old tests in "./testfiles-old" are only checked using pdftex, | |
# which is also the engine used to generate .png and .md5 files. | |
- name: Run old tests with l3build | |
run: | | |
l3build check -cconfig-old --halt-on-error --show-saves \ | |
${{ matrix.format == 'latex-dev' && '--dev' || '' }} | |
- name: Run old tests with ppmcheckpdf | |
id: ppmcheckpdf | |
run: | | |
texlua buildend.lua | |
## TODO: only save updated png and md5 files | |
# - name: Upload png and md5 | |
# if: matrix.tool == 'ppmcheckpdf' && steps.ppmcheckpdf.outcome == 'failure' | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: png-and-md5 | |
# path: | | |
# testfiles/*.png | |
# testfiles/*.md5 |