From 798d736599454de628cecb256c4eb78385988049 Mon Sep 17 00:00:00 2001 From: zydou Date: Fri, 25 Aug 2023 17:20:23 +0800 Subject: [PATCH] test: test `extra_fonts` function on multiple texlive versions --- .github/workflows/test-extra-fonts.yml | 48 ++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/test-extra-fonts.yml diff --git a/.github/workflows/test-extra-fonts.yml b/.github/workflows/test-extra-fonts.yml new file mode 100644 index 0000000..f527650 --- /dev/null +++ b/.github/workflows/test-extra-fonts.yml @@ -0,0 +1,48 @@ +--- +name: test extra-fonts + +on: + workflow_dispatch: + push: + branches: + - test-extra-fonts + +jobs: + test: + strategy: + fail-fast: false + matrix: + texlive_version: [20210301, 20220301, 20230301, latest] + name: Test ${{matrix.texlive_version}} + runs-on: ubuntu-latest + steps: + - name: Set up Git repository + uses: actions/checkout@v3 + + - name: Select texlive version + run: | + sed -i "s/texlive-full:latest/texlive-full:${{ matrix.texlive_version }}/" Dockerfile + cat Dockerfile + + - name: Download extra fonts + run: | + curl -OL https://github.com/google/fonts/raw/main/ofl/notosans/NotoSans-Regular.ttf + + - name: Compile LaTeX document with extra_fonts + uses: ./ + with: + root_file: extra_fonts.tex + working_directory: test/ + latexmk_use_xelatex: true + extra_fonts: "./../NotoSans-Regular.ttf" + + - name: Check pdf files + run: | + file test/extra_fonts.pdf | grep -q ' PDF ' + + - name: Upload + uses: actions/upload-artifact@v3 + with: + name: test + path: test + if: always()