@@ -2,9 +2,9 @@ name: Continuous builds
22
33on :
44 push :
5- branches : [ master, development ]
5+ branches : [ master, development, experimental, test* ]
66 pull_request :
7- branches : [ master, development ]
7+ branches : [ master, development, experimental, test* ]
88
99jobs :
1010 build :
@@ -13,22 +13,52 @@ jobs:
1313 strategy :
1414 matrix :
1515 python-version : [2.7, 3.7, 3.8, 3.9]
16+ fail-fast : false
1617
1718 steps :
19+
1820 - uses : actions/checkout@v2
1921 - name : Set up Python ${{ matrix.python-version }}
2022 uses : actions/setup-python@v2
2123 with :
2224 python-version : ${{ matrix.python-version }}
25+
26+ - name : Print refs
27+ run : |
28+ echo "github.ref is: ${{ github.ref }}"
29+ echo "github.base_ref is: ${{ github.base_ref }}"
30+
31+ - name : Install deps from development
32+ if : ${{ github.ref == 'refs/heads/development' || github.base_ref == 'development' }}
33+ run : |
34+ echo "Using deps from development for our repos"
35+ sed -E -i 's/((libNeuroML|NeuroMLlite|pylems|pyelectro|neurotune).git)@master/\1@development/' requirements-dev.txt
36+ sed -E -i 's/((modelspec).git)@main/\1@development/' requirements-dev.txt
37+
38+ - name : Install deps from experimental
39+ if : ${{ github.ref == 'refs/heads/experimental' || github.base_ref == 'experimental' }}
40+ run : |
41+ echo "Using deps from experimental - assuming development in others"
42+ sed -E -i 's/((libNeuroML|NeuroMLlite|pylems|pyelectro|neurotune).git)@master/\1@development/' requirements-dev.txt
43+ sed -E -i 's/((modelspec).git)@main/\1@development/' requirements-dev.txt
44+
2345 - name : Install package
2446 run : |
2547 python -m pip install --upgrade pip
26- pip install flake8
48+ pip install -r requirements-dev.txt
49+ pip install pytest
2750 pip install .
28- - name : Lint with flake8
29- run : |
30- flake8 . --count --exit-zero --show-source --max-line-length=127 --statistics
51+
3152 - name : Run tests
3253 run : |
54+ pytest .
3355 pynml -h
34- ./test-ghactions.sh
56+
57+ # For now, only test neuron related examples on py3
58+ if [[ ${{ matrix.python-version }} == "3."* ]]; then argnrn=-neuron ; fi
59+ ./test-ghactions.sh $argnrn
60+
61+ - name : Lint with flake8
62+ run : |
63+ pip install flake8
64+ flake8 . --count --exit-zero --show-source --max-line-length=127 --statistics
0 commit comments