Skip to content

Commit

Permalink
Convert to use new actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dkfellows committed Dec 14, 2020
1 parent 136baa6 commit 8da3776
Showing 1 changed file with 27 additions and 56 deletions.
83 changes: 27 additions & 56 deletions .github/workflows/python_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,9 @@
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python Actions

on: [push]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -33,74 +30,48 @@ jobs:
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
ref: actions

- name: Checkout Spinnaker Dependencies
run: |
support/gitclone2.sh https://github.com/SpiNNakerManchester/SpiNNUtils.git
support/gitclone2.sh https://github.com/SpiNNakerManchester/SpiNNMachine.git
- name: Install -pip
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 SpiNNMachine
run: python setup.py install
working-directory: SpiNNMachine

- 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: |
pytest unittests --cov spinnman
- name: Install pip, etc
uses: ./support/actions/python-tools
- name: Install Spinnaker Dependencies
uses: ./support/actions/checkout-spinn-deps
with:
repositories: SpiNNUtils SpiNNMachine
install: true
preinstall: ${{ matrix.python-version == 2.7 }}
- name: Setup
uses: ./support/actions/run-setup
with:
preinstall: ${{ matrix.python-version == 2.7 }}

- name: Test with pytest
if: matrix.python-version != 3.6
run: |
pytest unittests
uses: ./support/actions/pytest
with:
tests: unittests
coverage: ${{ matrix.python-version == 3.6 }}
cover-packages: spinnman
coveralls-token: ${{ secrets.COVERALLS_REPO_TOKEN }}

- name: Lint with flake8
run: |
# run flake8
flake8 spinnman unittests
run: flake8 spinnman unittests
- name: Lint with pylint
# Note that there's special conditioning of the return code of pylint
run: |
pylint --output-format=colorized --disable=R,C spinnman || exit $(($? & 35))
uses: ./support/actions/pylint
with:
package: spinnman

- 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: |
sphinx-build -W -T -E -b html -d _build/doctrees-readthedocsdirhtml -D language=en . _build/html
working-directory: doc/source

- 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: doc/source

0 comments on commit 8da3776

Please sign in to comment.