Skip to content

Commit d2dca52

Browse files
committed
Apparently mock is needed
1 parent de3109f commit d2dca52

2 files changed

Lines changed: 16 additions & 23 deletions

File tree

.github/workflows/python_actions.yml

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ on: [push]
2222

2323
jobs:
2424
build:
25-
2625
runs-on: ubuntu-latest
2726
strategy:
2827
matrix:
@@ -36,6 +35,7 @@ jobs:
3635

3736
- name: Checkout
3837
uses: actions/checkout@v2
38+
3939
- name: Checkout SupportScripts
4040
uses: actions/checkout@v2
4141
with:
@@ -54,7 +54,7 @@ jobs:
5454
5555
- name: Install -pip
5656
run: |
57-
python -m pip install --upgrade pip
57+
python -m pip install --upgrade pip setuptools wheel
5858
pip install 'pylint<2.5' python-coveralls 'coverage>=4.4,<5.0'
5959
6060
- name: Install SpiNNUtils
@@ -97,47 +97,42 @@ jobs:
9797

9898
- name: Preinstall requirements (2.7 Only)
9999
if: matrix.python-version == 2.7
100-
run: |
101-
pip install -r requirements.txt
100+
run: pip install -r requirements.txt
102101

103102
- name: Setup
104-
run: |
105-
python setup.py develop
103+
run: python setup.py develop
106104

107105
- name: Install requirements-test
108-
run: |
109-
pip install -r requirements-test.txt
106+
run: pip install -r requirements-test.txt
110107

111108
- name: Create a spynnaker.cfg
112109
run: |
113110
echo '[Machine]' > ~/.spynnaker.cfg
114111
echo "machineName = $SPINNAKER_BOARD_ADDRESS" >> ~/.spynnaker.cfg
115-
echo "version = ${SPINNAKER_BOARD_VERSION:-5}" >> ~/.spynnaker.cfg
112+
echo "version = $SPINNAKER_BOARD_VERSION" >> ~/.spynnaker.cfg
116113
echo '[Database]' >> ~/.spynnaker.cfg
117114
echo '[Simulation]' >> ~/.spynnaker.cfg
118115
echo '[Buffers]' >> ~/.spynnaker.cfg
116+
env:
117+
SPINNAKER_BOARD_ADDRESS: spinn-4.cs.man.ac.uk
118+
SPINNAKER_BOARD_VERSION: 5
119119

120120
- name: Test with pytest and coverage
121121
if: matrix.python-version == 3.6
122-
run: |
123-
pytest unittests --cov spynnaker
122+
run: pytest unittests --cov spynnaker
124123

125124
- name: Test with pytest
126125
if: matrix.python-version != 3.6
127-
run: |
128-
pytest unittests
126+
run: pytest unittests
129127

130128
- name: Lint with flake8
131-
run: |
132-
# run flake8
133-
flake8 spynnaker unittests
129+
run: flake8 spynnaker unittests
134130

135131
- name: Lint with pylint
136132
# Broken in 2.7 as it can not find data_specification.exceptions
137133
if: matrix.python-version != 2.7
138134
# Note that there's special conditioning of the return code of pylint
139-
run: |
140-
pylint --output-format=colorized --disable=R,C spynnaker || exit $(($? & 35))
135+
run: pylint --output-format=colorized --disable=R,C spynnaker || exit $(($? & 35))
141136

142137
- name: Run rat copyright enforcement
143138
if: matrix.python-version == 3.6
@@ -147,11 +142,8 @@ jobs:
147142
148143
- name: Build documentation with sphinx
149144
if: matrix.python-version == 3.6
150-
run: |
151-
cd doc/source
152-
sphinx-build -W -T -E -b html -d _build/doctrees-readthedocsdirhtml -D language=en . _build/html
153-
sphinx-build -W -T -b json -d _build/doctrees-json -D language=en . _build/json
154-
sphinx-build -W -T -b singlehtml -d _build/doctrees-readthedocssinglehtmllocalmedia -D language=en . _build/localmedia
145+
run: sphinx-build -W -T -E -b html -d _build/doctrees-readthedocsdirhtml -D language=en . _build/html
146+
working-directory: doc/source
155147

156148
- name: Run coveralls and report coverage
157149
if: matrix.python-version == 3.6

requirements-test.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ pytest-timeout
2222
sphinx==1.5.3
2323
testfixtures
2424
statistics
25+
mock

0 commit comments

Comments
 (0)