1
0
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:
Enno Gotthold 2022-10-21 10:43:33 +02:00
parent 0c2238435f
commit e23e13062f
No known key found for this signature in database
GPG Key ID: 18569829AD881702

View File

@ -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'