-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from SpiNNakerManchester/action
Convert the CI flow to a Github Action
- Loading branch information
Showing
6 changed files
with
109 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# Copyright (c) 2020 The University of Manchester | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
# This workflow will install Python dependencies, run tests, lint and rat with a variety of Python versions | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: Python Build | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [2.7, 3.6, 3.7, 3.8] | ||
|
||
steps: | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Checkout SupportScripts | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: SpiNNakerManchester/SupportScripts | ||
path: support | ||
|
||
- name: Checkout SpiNNaker dependencies | ||
run: | | ||
support/gitclone2.sh https://github.com/SpiNNakerManchester/SpiNNUtils.git | ||
- name: Install pip and code quality tools | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install 'pylint<2.5' python-coveralls 'coverage>=4.4,<5.0' | ||
- name: Install SpiNNUtils | ||
run: python setup.py install | ||
working-directory: SpiNNUtils | ||
|
||
- name: Install | ||
run: | | ||
python setup.py develop | ||
pip install -r requirements-test.txt | ||
- name: Test with pytest and coverage | ||
if: matrix.python-version == 3.6 | ||
run: | | ||
py.test tests/ --cov spalloc --cov tests --durations=10 --timeout=120 | ||
- name: Test with pytest | ||
if: matrix.python-version != 3.6 | ||
run: | | ||
py.test tests/ --durations=10 --timeout=120 | ||
- name: Lint with flake8 | ||
run: | | ||
flake8 spalloc tests | ||
- name: Lint with pylint | ||
# Note that there's special conditioning of the return code of pylint | ||
run: | | ||
pylint --output-format=colorized --disable=R,C spalloc || exit $(($? & 35)) | ||
- name: Run rat copyright enforcement | ||
if: matrix.python-version == 3.6 | ||
run: | | ||
support/rat.sh download | ||
support/rat.sh run | ||
- name: Build documentation with sphinx | ||
if: matrix.python-version == 3.6 | ||
run: | | ||
pip install -r requirements-docs.txt | ||
cd docs/source | ||
sphinx-build -W -T -E -b html -d _build/doctrees-readthedocsdirhtml -D language=en . _build/html | ||
- name: Run coveralls and report coverage | ||
if: matrix.python-version == 3.6 | ||
env: | ||
COVERALLS_SERVICE_NAME: 'GitHub CI' | ||
COVERALLS_REPO_TOKEN : ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
NODE_COVERALLS_DEBUG: 1 | ||
run: coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,6 +74,7 @@ target/ | |
|
||
# Hidden files | ||
.* | ||
!.github | ||
|
||
# Virtualenv nonsense | ||
pip-selfcheck.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
**/SpiNNUtils/** |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters