tests #577
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 ] | |
paths: | |
- "src/**.py" | |
- "tests/**.py" | |
- "setup.py" | |
- "setup.cfg" | |
- ".github/workflows/main.yml" | |
pull_request: | |
branches-ignore: ["**docker**"] | |
paths: | |
- "src/**.py" | |
- "tests/**.py" | |
- "setup.py" | |
- "setup.cfg" | |
- ".github/workflows/main.yml" | |
schedule: | |
- cron: "0 0 */7 * *" | |
jobs: | |
unit-tests: | |
name: pytest | |
strategy: | |
matrix: | |
python-version: ["3.7", "3.10", "3.11", "3.12"] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip | |
pip install -e .[dev,examples] | |
- name: Run unit tests | |
run: pytest | |
- name: Upload coverage to coveralls.io | |
if: ${{ matrix.python-version }} == 3.10 | |
run: coveralls --service=github | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
integration-tests: | |
name: cli examples | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.12"] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install apt dependencies | |
run: | | |
sudo apt-get install -yqq \ | |
texlive-base \ | |
texlive-latex-base \ | |
texlive-latex-extra \ | |
texlive-fonts-recommended \ | |
texlive-fonts-extra \ | |
texlive-science \ | |
latexmk \ | |
dvipng \ | |
cm-super | |
- name: Install Python dependencies | |
run: | | |
pip install --upgrade pip | |
pip install --upgrade mud-examples | |
pip install .[examples] | |
- name: Old CLI | |
continue-on-error: false | |
run: mud_run_all -v | |
- name: New CLI | |
run: mud examples mud-paper | |
texless-integration-tests: | |
name: texless cli examples | |
strategy: | |
matrix: | |
python-version: ["3.7"] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Python dependencies | |
run: | | |
pip install --upgrade pip | |
pip install --upgrade mud-examples | |
pip install .[examples] | |
- name: Old CLI | |
continue-on-error: true | |
run: mud_run_all -v | |
- name: New CLI | |
continue-on-error: true | |
run: mud examples mud-paper |