Updated MacOS runners in tests #367
Workflow file for this run
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
# MIT License | |
# | |
# Copyright (c) 2021-2024 Tobias Enderle | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a | |
# copy of this software and associated documentation files (the "Software"), | |
# to deal in the Software without restriction, including without limitation | |
# the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
# and/or sell copies of the Software, and to permit persons to whom the | |
# Software is furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included | |
# in all copies or substantial portions of the Software. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | |
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | |
# IN THE SOFTWARE. | |
name: Tests | |
env: | |
cache-version: v4 | |
on: [push] | |
jobs: | |
tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
[ | |
ubuntu-20.04, | |
ubuntu-22.04, | |
macos-13, | |
macos-14, | |
windows-2019, | |
windows-2022, | |
] | |
timeout-minutes: 25 | |
steps: | |
- name: OS switches and PATH | |
run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
echo "tl-dir=~" >> $GITHUB_ENV | |
echo ~/texlive/bin/x86_64-linux >> $GITHUB_PATH | |
elif [ "$RUNNER_OS" == "Windows" ]; then | |
echo "tl-dir=D:" >> $GITHUB_ENV | |
echo D:/texlive/bin/windows >> $GITHUB_PATH | |
else | |
echo "tl-dir=~" >> $GITHUB_ENV | |
echo ~/texlive/bin/universal-darwin >> $GITHUB_PATH | |
fi | |
shell: bash | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: pip | |
- name: Install Python dependencies | |
run: pip install -r test/requirements.txt | |
- uses: actions/cache@v3 | |
id: tl-env | |
with: | |
path: | | |
${{ env.tl-dir }}/texlive | |
${{ env.tl-dir }}/texmf | |
key: ${{ env.cache-version }}-${{ matrix.os }}-env | |
- name: Install TeX Live | |
if: steps.tl-env.outputs.cache-hit != 'true' | |
uses: ./.github/actions/texlive-install | |
with: | |
dir: ${{ env.tl-dir }} | |
- name: Install LaTeX dependencies | |
if: steps.tl-env.outputs.cache-hit != 'true' | |
run: | | |
tlmgr option -- autobackup 0 | |
tlmgr update --self | |
tlmgr install pgfplots lualatex-math luacode listings | |
tlmgr install fvextra catchfile xstring framed minted | |
tlmgr remove pyluatex || true | |
- name: Copy repository to LaTeX package folder | |
run: | | |
rm -rf ${{ env.tl-dir }}/texmf/tex/latex/pyluatex | |
mkdir -p ${{ env.tl-dir }}/texmf/tex/latex/pyluatex | |
cp -r . ${{ env.tl-dir }}/texmf/tex/latex/pyluatex/ | |
shell: bash | |
- name: Run tests | |
run: | | |
cd test | |
python3 run_special_tests.py | |
python3 run_tests.py | |
- name: Run examples | |
run: | | |
cd example | |
for f in *.tex; do | |
lualatex --shell-escape --interaction=nonstopmode $f | |
done | |
shell: bash |