-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.12 KB
/
static-code-analysis.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
---
# Perform static code analysis
# Name of the action
name: Static Code Analysis
# Events that trigger the action
on:
push:
pull_request:
workflow_dispatch:
jobs:
static_code_analysis:
name: Static code analysis
runs-on: ubuntu-latest
steps:
# checkout action documentation
# https://github.com/marketplace/actions/checkout
- name: Checkout repository
uses: actions/checkout@v4
with:
# Fetch all history for all branches and tags
fetch-depth: 0
# setup-python action documentation
# https://github.com/marketplace/actions/setup-python
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
# Install static code analysis packages
- name: Install static code analysis packages
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade -r \
requirements/requirements_static_code_analysis.txt
# Python static code analysis with bandit
- name: Python static code analysis
run: |
bandit -rc .bandit.yml .