Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,47 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
static-code-analysis:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/setup-python@v5
with:
python-version: 3.x

- name: Checkout repository
uses: actions/checkout@v6

- name: Setup virtual environment
working-directory: ./pytest
run: |
sudo apt-get update

# Install dependencies for python-ldap
sudo apt-get install -y libsasl2-dev python3-dev libldap2-dev libssl-dev libssh-dev

pip3 install virtualenv
python3 -m venv .venv
source .venv/bin/activate
pip3 install -r ./requirements.txt
pip3 install ruff mypy

- name: Ruff check
if: always()
working-directory: ./pytest
run: source .venv/bin/activate && ruff check .

- name: Ruff format
if: always()
working-directory: ./pytest
run: source .venv/bin/activate && ruff format --check .

- name: mypy
if: always()
working-directory: ./pytest
run: source .venv/bin/activate && mypy --install-types --non-interactive tests

pytest:
strategy:
fail-fast: false
Expand Down
76 changes: 0 additions & 76 deletions .github/workflows/static-code-analysis.yml

This file was deleted.

24 changes: 21 additions & 3 deletions pytest/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
[tool.ruff]
line-length = 119
target-version = "py312"
extend-exclude = ["docs"]

[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
]
extend-ignore = []

[tool.ruff.lint.isort]
required-imports = ["from __future__ import annotations"]

[tool.ruff.format]
quote-style = "double"
indent-style = "space"

[tool.mypy]
exclude = "docs"

Expand All @@ -16,6 +37,3 @@ add_imports = "from __future__ import annotations"

[tool.black]
line-length = 119

[tool.flake8]
max-line-length = 119
Loading
Loading