-
Notifications
You must be signed in to change notification settings - Fork 9
105 lines (83 loc) · 2.41 KB
/
ci.yml
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Continuous builds
on:
push:
branches: [ main, development, experimental, test* ]
pull_request:
branches: [ main, development, experimental, test* ]
jobs:
pre-commit:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v2
- uses: pre-commit/[email protected]
with:
extra_args: --hook-stage manual --all-files
build:
name: Build for Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
python-version: [ "3.7", "3.8", "3.9", "3.10"]
runs-on: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install package
run: |
python -m pip install --upgrade pip
pip install .[dev]
- name: Lint with flake8
run: |
flake8 . --count --exit-zero --show-source --max-line-length=127 --statistics
- name: List packages so far
run: |
pip list
- name: Run some examples
run: |
cd examples
python document.py
cd test
python test.py
## Test NeuroML example
cd ../neuroml2
python neuroml2_spec.py
pip install pyneuroml
# Requires: pip install pyneuroml
pynml -validate hello_world_neuroml.net.nml
pynml -validate TestNeuroML.xml
- name: Run pytest
run: |
pytest tests
- name: Install & test NeuroMLlite
run: |
git clone --branch development https://github.com/NeuroML/NeuroMLlite.git
cd NeuroMLlite
#pip install . # Use versions of neuroml libs as set in setup.py
cd examples
python Example1.py
- name: Install MDF
run: |
git clone --branch development https://github.com/ModECI/MDF.git
cd MDF
pip install .
cd examples/MDF
python arrays.py -run # test one example
- name: Build Documentation
run: |
pip install .[docs]
cd docs
python generate.py
python contributors.py
cd sphinx
make clean
make html
- name: Final version info
run: |
pip list
env