-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (77 loc) · 2.7 KB
/
workflow.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
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