-
Notifications
You must be signed in to change notification settings - Fork 9
89 lines (89 loc) · 2.58 KB
/
lint.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Lint
on:
push:
branches:
- master
pull_request:
merge_group:
jobs:
detect-secrets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: pip install tox==3.24.4
- name: Check for secret lekeage
run: tox -e secrets
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: pip install tox==3.24.4
- name: Check that code is formatted with black
run: tox -e black
isort:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: pip install tox==3.24.4
- name: Check that imports are formatted with isort
run: tox -e isort
flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: pip install tox==3.24.4
- name: Lint codebase with flake8
run: tox -e flake8
bandit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: pip install tox==3.24.4
- name: Scan codebase for security issues
run: tox -e bandit
migrations:
runs-on: ubuntu-latest
steps:
- name: Install required ubuntu packages
run: sudo apt update && sudo apt install libkrb5-dev build-essential python3-dev libldap2-dev libsasl2-dev libssl-dev
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: pip install tox==3.24.4
- name: Ensure Django migrations have been generated
run: tox -e migrations
schema:
runs-on: ubuntu-latest
steps:
- name: Install required ubuntu packages
run: sudo apt update && sudo apt install libkrb5-dev build-essential python3-dev libldap2-dev libsasl2-dev libssl-dev
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: pip install tox==3.24.4
- name: Ensure the OpenAPI schema has been generated
run: tox -e schema