Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 7 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,33 +39,19 @@ jobs:
python-version: "3.12.8"
source-path: 06_automation/send_report.py

# ── Job 1: Lint ──────────────────────────────────────────────────────────────
lint:
name: Lint (ruff)
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install ruff
run: pip install ruff

- name: Run ruff check
run: ruff check .

- name: Run ruff format check
run: ruff format --check .
permissions:
contents: read
uses: DevOpsDerek/workflows/.github/workflows/lint-python-ruff.yml@35ec3f531b5eb0f0f42f232f23e1dc5735e36c35
with:
python-version: "3.12.8"
ruff-version: "0.11.13"

# ── Job 2: Test matrix ───────────────────────────────────────────────────────
test:
name: Test (Python ${{ matrix.python-version }} / ${{ matrix.os }})
needs: lint # Only run tests if lint passes
needs: lint
runs-on: ${{ matrix.os }}

strategy:
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ sysadmin-scripts/
pip install -r requirements.txt
```

### Developer Checks
Install the development tools and run the read-only lint and format checks:
```bash
pip install -r requirements-dev.txt
ruff check .
ruff format --check .
```
These commands report issues without modifying files.

### Run Any Script
```bash
python 01_filesystem/list_files.py
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Test dependencies (install alongside requirements.txt)
# pip install -r requirements-dev.txt

ruff==0.11.13
pytest>=7.4.0
pytest-cov>=4.1.0 # coverage reporting
Loading