mirror of
https://github.com/Threnklyn/dungeon-sheets.git
synced 2026-05-18 20:23:27 +02:00
46 lines
1.4 KiB
YAML
46 lines
1.4 KiB
YAML
name: Python package
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up required system dependencies
|
|
run: sudo apt-get -y install pdftk texlive-latex-base texlive-latex-extra texlive-fonts-recommended texlive-fonts-extra
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v4.0.0
|
|
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 -r requirements.txt
|
|
pip install -r requirements-tests.txt
|
|
pip install -e .
|
|
- name: Install DnD LaTeX styles
|
|
run: |
|
|
echo "$(kpsewhich -var-value TEXMFHOME)/tex/latex/"
|
|
mkdir -p "$(kpsewhich -var-value TEXMFHOME)/tex/latex/"
|
|
git clone https://github.com/rpgtex/DND-5e-LaTeX-Template.git "$(kpsewhich -var-value TEXMFHOME)/tex/latex/dnd"
|
|
- name: Run tests
|
|
run: |
|
|
pytest --cov=dungeonsheets tests/
|
|
flake8 dungeonsheets/ --exit-zero
|
|
cd examples/
|
|
makesheets --debug
|
|
makesheets --debug --fancy
|
|
makesheets --debug --output-format=epub
|
|
continue-on-error: true
|