correct docstring for deploy (#755) #15
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: tests | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Allows usage from other workflows | |
workflow_call: | |
jobs: | |
format-and-types: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install linters and formatters | |
run: python -m pip install flake8 black mypy | |
- name: Initialize project | |
run: | | |
python -m pip install -e . | |
python scripts/fetch_core.py | |
python scripts/zip_templates.py | |
- name: Check formatting with black | |
run: python -m black --check --diff $(git ls-files "*.py") | |
- name: Check for lint | |
run: python -m flake8 | |
- name: Check types | |
run: python -m mypy --install-types --non-interactive | |
tests: | |
needs: format-and-types | |
strategy: | |
fail-fast: true | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
poetry-version: ["1.5.1"] | |
os: [ubuntu-latest, windows-latest] | |
exclude: | |
- os: windows-latest | |
python-version: "3.9" | |
- os: windows-latest | |
python-version: "3.10" | |
- os: windows-latest | |
python-version: "3.11" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install apt packages (Linux with python 3.11 only) | |
if: runner.os == 'Linux' && matrix.python-version == '3.11' | |
run: | | |
sudo apt update | |
sudo apt install -y --no-install-recommends texlive texlive-science texlive-xetex ghostscript pdf2svg texlive-fonts-extra sagemath | |
- name: Install poetry ${{ matrix.poetry-version }} | |
run: | | |
python -m ensurepip | |
python -m pip install --upgrade pip | |
python -m pip install poetry==${{ matrix.poetry-version }} | |
- name: View poetry --help | |
run: poetry --help | |
- name: Install dependencies | |
shell: bash | |
run: | | |
python -m poetry install | |
python -m poetry run python scripts/fetch_core.py | |
python -m poetry run python scripts/zip_templates.py | |
- name: Test with pytest | |
run: | | |
python -m poetry run pytest -v --cov |