Some intermediate work #388
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: Run tests and lint | |
on: [pull_request] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
default: | |
strategy: | |
fail-fast: false | |
matrix: | |
# We test against 3.7 because wheels are built for these | |
# versions of python, and I didn't figure out a way of disabling that. | |
python_version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
defaults: | |
run: | |
shell: bash -l {0} | |
env: | |
PKG_CONFIG_PATH: "/home/runner/micromamba-root/envs/libsemigroups/lib/pkgconfig:/home/runner/micromamba-root/envs/libsemigroups/share/pkgconfig/" | |
LD_LIBRARY_PATH: "/home/runner/micromamba-root/envs/libsemigroups/lib" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "Install conda environment from environment.yml . . ." | |
uses: mamba-org/provision-with-micromamba@main | |
with: | |
extra-specs: python=${{ matrix.python_version }} | |
- name: "Python version . . ." | |
run: | | |
micromamba activate libsemigroups | |
python --version | |
pip3 --version | |
- name: "Pip installing requirements.txt . . ." | |
run: | | |
pip3 install -r requirements.txt | |
- name: "Pip3 installing libsemigroups_pybind11 . . ." | |
run: | | |
pip3 install . -v | |
- name: "python -m pytest -vv tests/test_*.py . . ." | |
run: | | |
python -m pytest -vv tests/test_*.py | |
- name: "Run doc tests . . ." | |
# TODO figure out how to get this to work with python 3.11 | |
if: ${{ matrix.python_version != '3.11' }} | |
run: | | |
etc/make-doc.sh # so that all files are generated! | |
cd docs | |
python -m sphinx -b doctest -d _build/doctrees source _build/doctest | |
- name: "Pip3 installing pylint + cpplint . . ." | |
run: | | |
pip3 install pylint cpplint | |
- name: "Running pylint and cpplint . . ." | |
run: | | |
python -m pylint setup.py tests/*.py libsemigroups_pybind11/*.py | |
python -m cpplint src/*.hpp src/*.cpp |