-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (27 loc) · 976 Bytes
/
static-code-analysis.yml
File metadata and controls
35 lines (27 loc) · 976 Bytes
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
# Static Code Analysis, called when PR to main or push to feature/**, feat/**, fix/** branches.
name: Static Code Analysis
on:
workflow_call:
inputs:
coverage_artifact:
required: true
type: boolean
jobs:
static-code-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Run Static Code Analysis
run: uvx pre-commit run --all-files --show-diff-on-failure --color=always
- name: Install dependencies
run: |
uv venv
uv pip install -r requirements.txt
- name: Run unit tests (with coverage report)
if: ${{ inputs.coverage_artifact }}
run: uv run pytest --cov=./src --cov-report=xml --cov-report=term
- name: Run unit tests (console-only coverage)
if: ${{ !inputs.coverage_artifact }}
run: uv run pytest --cov=./src --cov-report=term-missing