Skip to content

Commit

Permalink
coverage-package pylint_packages mypy-packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Jun 3, 2024
1 parent e30c7cd commit fafa89f
Showing 1 changed file with 24 additions and 17 deletions.
41 changes: 24 additions & 17 deletions .github/workflows/python_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,27 @@ name: Python Actions
on:
workflow_call:
inputs:
base-package:
description: >
The names of the base Python package.
Will be the one uses for coverage, plyint and mypy
required: true
type: string
dependencies:
description: >
The list of SpiNNaker dependencies to check out. Space-separated
required: true
type: string
test_directories:
description: >
The list of directories to run pytest on. Space-seperated
required: true
type: string
ubuntu_packages:
description: >
The names of the ubuntu packages to install
These are NOT installed on none linux workflows
required: false
type: string
default: ''
test_directories:
description: >
The list of directories to run pytest on. Space-seperated
required: true
type: string
coverage-package:
description: The names of the Python package to get coverage for
required: true
type: string
flake8-packages:
description: The names of the Python packages to run flake8 on.
required: true
Expand All @@ -67,11 +65,20 @@ on:
default: global_strict
# global_relaxed and global_strict will use files in support scripts
# Any other value will be looked for in the calling repository
pylint-packages:
description: The names of the Python packages to run flake8 on.
required: true
type: string
pylint_exitcheck:
description: The combined results code to fail on
required: false
type: string
default: "31" # Action fails on any message
mypy-packages:
description: The names of the Python packages to run flake8 on.
required: true
type: string

rat_config_file:
description: >
Which xml config file to use for rat.
Expand Down Expand Up @@ -141,20 +148,20 @@ jobs:
- name: Lint with pylint
uses: SpiNNakerManchester/SupportScripts/actions/pylint@main
with:
package: ${{ inputs.base-package }}
package: ${{ inputs.pylint-packages }}
exitcheck: ${{ inputs.pylint_exitcheck }}
rcfile: ${{ inputs.rcfile }}
language: en_GB

- name: Lint with mypy
run: mypy ${{ inputs.base-package }}
run: mypy ${{ inputs.mypy-packages }}

- name: Test with pytest
uses: SpiNNakerManchester/SupportScripts/actions/pytest@main
with:
tests: ${{ inputs.test_directories }}
coverage: ${{ matrix.coverage == 'coverage' }}
cover-packages: ${{ inputs.base-package }}
cover-packages: ${{ inputs.coverage-package }}
coveralls-token: ${{ secrets.GITHUB_TOKEN }}
env:
SPALLOC_USER: ${{ secrets.SPALLOC_USER }}
Expand Down Expand Up @@ -206,22 +213,22 @@ jobs:
if: ${{ matrix.python-version != env.PRERELEASE || inputs.check_prereleases == 'true' }}
uses: SpiNNakerManchester/SupportScripts/actions/pylint@main
with:
package: ${{ inputs.base-package }}
package: ${{ inputs.coverage-package }}
exitcheck: ${{ inputs.pylint_exitcheck }}
rcfile: ${{ inputs.rcfile }}
language: en_GB

- name: Lint with mypy
if: ${{ matrix.python-version != env.PRERELEASE || inputs.check_prereleases == 'true' }}
run: mypy ${{ inputs.base-package }}
run: mypy ${{ inputs.pylint-packages }}

- name: Test with pytest
if: ${{ matrix.python-version != env.PRERELEASE || inputs.check_prereleases == 'true' }}
uses: SpiNNakerManchester/SupportScripts/actions/pytest@main
with:
tests: ${{ inputs.test_directories }}
coverage: ${{ matrix.coverage == 'coverage' }}
cover-packages: ${{ inputs.base-package }}
cover-packages: ${{ inputs.coverage-package }}
coveralls-token: ${{ secrets.GITHUB_TOKEN }}
env:
SPALLOC_USER: ${{ secrets.SPALLOC_USER }}
Expand Down

0 comments on commit fafa89f

Please sign in to comment.