Merge pull request #6 from esa/khan-boundaries #66
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: Testing | |
on: [push] | |
jobs: | |
static: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: pip install black==22.8.0 flake8==5.0.4 isort mypy | |
- run: mypy --ignore-missing-imports pyoptgra/*.py | |
- run: black --check pyoptgra/*.py | |
- run: flake8 --max-line-length 125 --ignore='E203','W503','E123','E704','W504','E126','E226','E121','E24' pyoptgra/*.py | |
- run: isort --profile black --check pyoptgra | |
cplusplus-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: sudo apt update && sudo apt install gfortran g++ cmake --yes | |
- run: mkdir build | |
- run: cmake .. | |
working-directory: build | |
- run: make optgra-test raii-test bare-test | |
working-directory: build | |
- run: chmod u+x optgra-test raii-test bare-test | |
working-directory: build | |
- run: ./bare-test | |
working-directory: build | |
- run: ./raii-test | |
working-directory: build | |
- run: ./optgra-test | |
working-directory: build | |
python-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- uses: actions/checkout@v2 | |
- run: sudo apt update && sudo apt install gfortran --yes | |
- run: git submodule update --init --recursive # Ensure submodules are updated | |
- run: python -m pip install . | |
- run: pip install pytest-cov coverage | |
- run: pytest --cov pyoptgra --cov-report term-missing test.py | |
working-directory: tests/python | |
- run: coverage report --fail-under=95 | |
working-directory: tests/python | |
doctest: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- uses: actions/checkout@v2 | |
- run: sudo apt update && sudo apt install gfortran --yes | |
- run: git submodule update --init --recursive # Ensure submodules are updated | |
- run: pip install sphinx breathe | |
- run: python -m pip install . | |
- run: make doctest | |
working-directory: doc/sphinx | |
documentation: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- uses: actions/checkout@v2 | |
- run: sudo apt update && sudo apt install gfortran doxygen --yes | |
- run: git submodule update --init --recursive # Ensure submodules are updated | |
- run: pip install sphinx breathe sphinx-rtd-theme | |
- run: python -m pip install . | |
- run: cd doc/doxygen | |
- run: doxygen Doxyfile | |
working-directory: doc/doxygen | |
- run: make html | |
working-directory: doc/sphinx |