-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (44 loc) · 1.29 KB
/
test-sfa.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
name: Format check + static analysis + testing
on:
push:
paths:
- "sast-fuzz/static_analysis/sast/src/**.py"
permissions:
contents: read
jobs:
test-sfa:
strategy:
matrix:
python-version: [ '3.11' ]
poetry-version: [ '1.5.0' ]
os: [ ubuntu-20.04 ]
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: sast-fuzz/static_analysis/sast
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set Python version
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set Poetry version
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install dependencies
run: |-
poetry install
- name: Check code formatting
run: |-
poetry run isort --check src --profile black
poetry run black --check src --line-length 120 --skip-magic-trailing-comma
- name: Run static analysis
run: |-
poetry run mypy src
poetry run bandit --recursive src
- name: Run tests with coverage analysis
run: |-
poetry run coverage run
poetry run coverage report