diff --git a/.github/workflows/python_actions.yml b/.github/workflows/python_actions.yml index f0998897..5ebe4363 100644 --- a/.github/workflows/python_actions.yml +++ b/.github/workflows/python_actions.yml @@ -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