Skip to content

Commit

Permalink
Merge pull request #271 from SpiNNakerManchester/on_workflow
Browse files Browse the repository at this point in the history
Use a complex workflow on Support scripts.
  • Loading branch information
Christian-B authored May 22, 2024
2 parents a087972 + a33aec1 commit 1a1f5c1
Showing 1 changed file with 8 additions and 87 deletions.
95 changes: 8 additions & 87 deletions .github/workflows/python_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,91 +17,12 @@

name: Python Actions
on: [push]
env:
ROOT_PKG: spinn_utilities

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
python-version: [3.8, 3.9, '3.10', '3.11', '3.12']

steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Checkout
uses: actions/checkout@v4
- name: Checkout SupportScripts
uses: actions/checkout@v4
with:
repository: SpiNNakerManchester/SupportScripts
path: support
- name: Install pip, etc.
uses: ./support/actions/python-tools
- name: Install mypy
run: pip install mypy

- name: Run Install
uses: ./support/actions/run-install
- name: Test with pytest
uses: ./support/actions/pytest
with:
tests: unittests
coverage: ${{ matrix.python-version == 3.12 }}
cover-packages: ${{ env.ROOT_PKG }}
coveralls-token: ${{ secrets.GITHUB_TOKEN }}
env:
# Tests using ping won't work in Github Actions because of system config
SKIP_PING_TESTS: true

- name: Lint with flake8
run: flake8 $ROOT_PKG unittests
- name: Lint with pylint
uses: ./support/actions/pylint
with:
package: ${{ env.ROOT_PKG }}
exitcheck: 31 # Action fails on any message
language: en_GB
rcfile: global_strict
- name: Lint with mypy
run: mypy $ROOT_PKG

validate:
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
python-version: [3.12]

steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Checkout
uses: actions/checkout@v4
- name: Checkout SupportScripts
uses: actions/checkout@v4
with:
repository: SpiNNakerManchester/SupportScripts
path: support
- name: Install pip, etc.
uses: ./support/actions/python-tools
- name: Setup
uses: ./support/actions/run-install

# Actual valiation steps
- name: Run rat copyright enforcement
uses: ./support/actions/check-copyrights
with:
config_file: rat_asl20.xml
- name: Build documentation with sphinx
uses: ./support/actions/sphinx
with:
directory: doc/source
- name: Validate CITATION.cff
uses: dieghernan/cff-validator@main
call:
uses: SpiNNakerManchester/SupportScripts/.github/workflows/python_checks.yml@main
with:
base-package: spinn_utilities
dependencies:
test_directories: unittests
flake8-packages: spinn_utilities unittests
secrets: inherit

0 comments on commit 1a1f5c1

Please sign in to comment.