-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
👷 Run code quality checks through tox
* Add flake8 to code checks * Use Github actions matrix * Prepare for Python 3.12
- Loading branch information
1 parent
7d37441
commit 5708423
Showing
1 changed file
with
14 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,43 +7,27 @@ on: | |
- main | ||
tags: | ||
- '*' | ||
paths: | ||
- '**.py' | ||
pull_request: | ||
paths: | ||
- '**.py' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
isort: | ||
name: Check import sorting | ||
linting: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python: ['3.10', '3.12'] | ||
toxenv: [isort, black, flake8] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Install dependencies | ||
run: | | ||
pip install isort | ||
- uses: isort/[email protected] | ||
with: | ||
sort-paths: 'prefill_haalcentraalhr tests' | ||
configuration: '--check-only --diff' | ||
|
||
black: | ||
name: Check code formatting with black | ||
runs-on: ubuntu-latest | ||
name: "Code style: ${{ matrix.toxenv }}, py${{ matrix.python }}" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
python-version: ${{ matrix.python }} | ||
- name: Install dependencies | ||
run: | | ||
pip install black | ||
- name: Run black | ||
run: | | ||
black --check prefill_haalcentraalhr tests | ||
run: pip install tox tox-gh-actions tox-uv | ||
|
||
- run: tox | ||
env: | ||
TOXENV: ${{ matrix.toxenv }} |