Merge branch 'dev' of https://github.com/MaibornWolff/SecObserve into… #299
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
name: Check backend | |
on: [push, pull_request] | |
permissions: read-all | |
env: | |
POETRY_NO_INTERACTION: 1 | |
jobs: | |
check_backend: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
with: | |
python-version: 3.12 | |
- name: Install dependencies | |
working-directory: ./backend | |
run: | | |
python -m pip install --upgrade -r poetry_requirements.txt | |
python -m pip install --upgrade import-linter | |
python -m poetry install --extras "code_quality dev" --no-root | |
- name: Flake8 | |
working-directory: ./backend | |
run: | | |
poetry run flake8 . --count --show-source --statistics | |
- name: Black | |
working-directory: ./backend | |
run: | | |
poetry run black . --check | |
- name: isort | |
working-directory: ./backend | |
run: | | |
poetry run isort . -c | |
- name: MyPy | |
working-directory: ./backend | |
run: | | |
./bin/run_mypy.sh | |
- name: PyLint | |
working-directory: ./backend | |
run: | | |
./bin/run_pylint.sh | |
- name: Import linter | |
working-directory: ./backend | |
run: | | |
lint-imports --no-cache | |
- name: Unittests | |
run: | | |
docker build -f docker/backend/unittests/django/Dockerfile -t secobserve_backend_unittests:latest . | |
docker run --rm --env-file docker/backend/unittests/envs/django --env-file docker/backend/unittests/envs/sqlite secobserve_backend_unittests:latest /start |