mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 14:56:14 +01:00
CI: Add code linters
This adds mypy & darker (black) to GitHub Actions. These will fail because the code lacks type annotations and doesn't follow the latest code style guidelines yet.
This commit is contained in:
parent
0c2238435f
commit
e23e13062f
23
.github/workflows/linters.yaml
vendored
23
.github/workflows/linters.yaml
vendored
@ -13,6 +13,29 @@ on:
|
||||
- '**.py'
|
||||
|
||||
jobs:
|
||||
mypy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
- run: pip install mypy
|
||||
- run: pip install types-cryptography types-urllib3
|
||||
- run: pip install distro keyring progressbar zstandard
|
||||
- run: mypy osc
|
||||
|
||||
darker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@v4
|
||||
- uses: akaihola/darker@1.5.1
|
||||
with:
|
||||
options: "--check --diff --color --line-length=120"
|
||||
src: "."
|
||||
version: "1.5.1"
|
||||
|
||||
pylint_plugins:
|
||||
name: 'Diff pylint runs on osc plugin'
|
||||
runs-on: 'ubuntu-latest'
|
||||
|
Loading…
Reference in New Issue
Block a user