name: Lint

on:
  pull_request:
    branches: [ main ]

jobs:
  security-scan:
    permissions:
      contents: read
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4

    - name: Set up Python
      uses: actions/setup-python@v4
      with:
        python-version-file: "pyproject.toml"

    - name: Install uv
      uses: astral-sh/setup-uv@v5
        
    - name: Install dependencies
      run: |
        uv sync --locked --all-extras --dev
        
    - name: Ruff Check
      run: |
        sh lint.sh ci

    - name: Unit Tests
      run: |
        uv run pytest -m "not bdd"
