fix CodeQL returning empty results #25
Workflow file for this run
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: 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 |