-
Notifications
You must be signed in to change notification settings - Fork 10
63 lines (48 loc) · 1.64 KB
/
check_backend.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Python 3.12
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.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 --without prod,unittests --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