Skip to content

fix/feat: OCPI audit fixes and improvements #68

fix/feat: OCPI audit fixes and improvements

fix/feat: OCPI audit fixes and improvements #68

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
pull-requests: write
jobs:
test:
name: Test (${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "latest"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install dependencies
run: |
uv sync --all-extras
- name: Run tests with coverage
run: |
uv run pytest --cov=ocpi --cov-report=xml --cov-report=term-missing
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "latest"
- name: Set up Python
run: uv python install 3.11
- name: Install dependencies
run: |
uv sync --extra dev
# Run ruff check (same as pre-commit, but without --fix)
# Pre-commit automatically fixes issues, CI verifies they're fixed
- name: Run ruff check
run: |
uv run ruff check .
# Run ruff format check (same as pre-commit ruff-format, but --check only)
# Pre-commit automatically formats, CI verifies formatting is correct
- name: Run ruff format check
run: |
uv run ruff format --check .
type-check:
name: Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "latest"
- name: Set up Python
run: uv python install 3.11
- name: Install dependencies
run: |
uv sync --extra dev
- name: Run mypy
run: |
uv run mypy ocpi