name: lint_python
on: [pull_request, push]
jobs:
  lint_python:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: actions/setup-python@v6
        with:
          cache: pip
          python-version: 3.x
      - run: pip install --upgrade pip setuptools wheel
      - run: pip install .[all]
      - run: black --check --skip-string-normalization . || true
      - run: ruff check --output-format=github  # See pyproject.toml for configuration
      - run: pip install -r pex-requirements.txt -r tests/requirements.txt
      - run: mypy .  # See setup.cfg for configuration
      - run: safety check || true  # Temporary fix for https://pyup.io/v/51457/f17
