Skip to content

Commit

Permalink
Merge pull request #52 from SpiNNakerManchester/setup-action-spalloc
Browse files Browse the repository at this point in the history
Convert to use new actions
  • Loading branch information
dkfellows committed Dec 17, 2020
2 parents 186b9fc + b920338 commit 4f763cd
Showing 1 changed file with 26 additions and 50 deletions.
76 changes: 26 additions & 50 deletions .github/workflows/python_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
# 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
Expand All @@ -32,7 +30,6 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Checkout
uses: actions/checkout@v2
- name: Checkout SupportScripts
Expand All @@ -41,60 +38,39 @@ jobs:
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: Install pip, etc
uses: ./support/actions/python-tools
- name: Install Spinnaker Dependencies
uses: ./support/actions/checkout-spinn-deps
with:
repositories: SpiNNUtils
install: true
- name: Setup
uses: ./support/actions/run-setup
- name: Extra setup
run: pip install -r requirements-docs.txt

- name: Test with pytest
if: matrix.python-version != 3.6
run: |
py.test tests/ --durations=10 --timeout=120
uses: ./support/actions/pytest
with:
tests: tests
options: --durations=10 --timeout=120
coverage: ${{ matrix.python-version == 3.6 }}
cover-packages: spalloc tests
coveralls-token: ${{ secrets.COVERALLS_REPO_TOKEN }}

- name: Lint with flake8
run: |
flake8 spalloc tests
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))
uses: ./support/actions/pylint
with:
package: spalloc

- name: Run rat copyright enforcement
if: matrix.python-version == 3.6
run: |
support/rat.sh download
support/rat.sh run
uses: ./support/actions/check-copyrights
- 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
uses: ./support/actions/sphinx
with:
directory: docs/source

0 comments on commit 4f763cd

Please sign in to comment.