forked from pyrometheus/pyrometheus
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (62 loc) · 1.91 KB
/
ci.yml
File metadata and controls
66 lines (62 loc) · 1.91 KB
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
name: CI
on:
push:
pull_request:
schedule:
- cron: '17 3 * * 0'
jobs:
flake8:
name: Flake8
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Flake8
run: python3 -m pip install .[dev] && flake8
flake8_gen:
name: Flake8 on Generated Code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Flake8
run: |
python3 -m pip install .[dev]
python3 .ci/generate-test-mech.py
flake8 --extend-ignore E501,Q000 test/mechs
pytest:
name: Pytest Conda Py${{ matrix.python_version }}
strategy:
matrix:
python_version: ["3.9", "3.11"]
runs-on: ubuntu-latest
env:
PYTHON_VERSION: ${{ matrix.python_version }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: "PyTest"
run: |
python3 -m pip install .[test]
cmake -S test -B build -Dpybind11_DIR=`python3 -m pybind11 --cmakedir`
cmake --build build --parallel $(nproc)
ctest --test-dir build
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: 'Build Docs'
run: |
python3 -m pip install -e .[docs]
python3 .ci/generate-example-mech.py test/mechs/sandiego.yaml pyrometheus/thermochem_example.py
cd doc && make html SPHINXOPTS='-W --keep-going -n'