Assorted changes and a couple of fixes to the fancy sheets #12
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
name: Python package | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
name: "Run test suite" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ['3.9', '3.10', '3.11'] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set up required system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get -y install pdftk texlive-latex-base texlive-latex-extra texlive-fonts-recommended texlive-fonts-extra texlive-luatex texlive-pstricks | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
- name: Install dependencies and do a local pip install | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e ".[dev]" | |
- name: Run flake | |
run: flake8 dungeonsheets/ --exit-zero | |
- name: Run tests | |
run: pytest --cov=dungeonsheets tests/ | |
render_examples: | |
name: "Test python-3.12, render all examples" | |
runs-on: ubuntu-latest | |
needs: [build] | |
strategy: | |
matrix: | |
build-command: ["", "--fancy --tex-template --spells-by-level --feats-by-type", "--output-format=epub"] | |
steps: | |
- uses: actions/checkout@v4 | |
name: Checkout Repo | |
with: | |
submodules: recursive | |
- name: Set up required system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get -y install pdftk texlive-latex-base texlive-latex-extra texlive-fonts-recommended texlive-fonts-extra texlive-luatex texlive-pstricks | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
cache: pip | |
- name: Install dependencies and do a local pip install | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e ".[dev]" | |
- name: Run flake | |
run: flake8 dungeonsheets/ --exit-zero | |
- name: Run tests | |
run: pytest --cov=dungeonsheets tests/ | |
- name: Render examples with ${{ matrix.build-command }} | |
run: | | |
cd examples | |
makesheets --debug ${{ matrix.build-command }} |