Div. dev ops updates (#43)

* Pipline rework to limit mypy and balck to src and tests
* Poetry update
* pre-commit update
This commit is contained in:
Philipp Horstenkamp 2023-08-10 19:20:12 +02:00 committed by GitHub
parent 29b851169c
commit 50bf7811ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 571 additions and 368 deletions

View File

@ -9,8 +9,7 @@ on:
pull_request:
jobs:
run-linters:
name: Black & mypy
Black:
runs-on: ubuntu-latest
steps:
- name: Set up python
@ -28,10 +27,29 @@ jobs:
virtualenvs-path: ~/local/share/virtualenvs
- run: poetry install --without develop,doc,test
- name: Run linters
uses: wearerequired/lint-action@v2
run: |
black src tests
mypy:
runs-on: ubuntu-latest
steps:
- name: Set up python
id: setup-python
uses: actions/setup-python@v4
with:
black: true
mypy: true
python-version: '3.11'
- name: Check out Git repository
uses: actions/checkout@v3
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.4.2
virtualenvs-create: false
virtualenvs-path: ~/local/share/virtualenvs
- run: poetry install --without develop,doc
- name: Run linters
run: |
mypy src tests
ruff:
runs-on: ubuntu-latest

View File

@ -25,13 +25,13 @@ repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.0.277
rev: v0.0.284
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.7.0
hooks:
- id: black
args: [--config=pyproject.toml]
@ -40,7 +40,7 @@ repos:
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.9.0
rev: v2.10.0
hooks:
- id: pretty-format-ini
args: [--autofix]
@ -61,7 +61,7 @@ repos:
- types-requests
- repo: https://github.com/frnmst/md-toc
rev: 8.1.9
rev: 8.2.0
hooks:
- id: md-toc
@ -76,6 +76,6 @@ repos:
- id: validate-html
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.23.2
rev: 0.24.0
hooks:
- id: check-github-workflows

View File

@ -1,5 +1,6 @@
HOSTNAME="stagingdbtransparenzreg.ioappzs.mongodb.net"
DATABASE="transparenzregister"
PORT=None
USERNAME="db_user"
PASSWORD="secret_password"
"""Placholder to login int the FH db."""
HOSTNAME = "stagingdbtransparenzreg.ioappzs.mongodb.net"
DATABASE = "transparenzregister"
PORT = None
USERNAME = "db_user"
PASSWORD = "secret_password" # noqa: S105

View File

@ -1,5 +1,6 @@
HOSTNAME="172.17.38.210"
DATABASE="transparenzregister"
PORT=30217
USERNAME="root"
PASSWORD="secret_password"
"""Placholder to login int the FH db."""
HOSTNAME = "172.17.38.210"
DATABASE = "transparenzregister"
PORT = 30217
USERNAME = "root"
PASSWORD = "secret_password" # noqa: S105

879
poetry.lock generated

File diff suppressed because it is too large Load Diff