Static Analysis #267
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
# Check DVR-Scan code lint warnings and formatting. | |
name: Static Analysis | |
on: | |
pull_request: | |
paths: | |
- dvr_scan/** | |
- tests/** | |
push: | |
paths: | |
- dvr_scan/** | |
- tests/** | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.x | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade yapf toml | |
python -m pip install -r requirements_headless.txt | |
- name: Check Code Format (yapf) | |
if: ${{ hashFiles('.style.yapf') != '' }} | |
run: | | |
python -m yapf --diff --recursive dvr_scan/ | |
python -m yapf --diff --recursive tests/ | |
- name: Static Analysis (ruff) | |
if: ${{ hashFiles('.style.yapf') == '' }} | |
run: | | |
python -m pip install --upgrade ruff | |
python -m ruff check | |
python -m ruff format --check |