name: lint_python
on: [pull_request, push]
jobs:
  lint_python:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-python@v4
        with:
          cache: pip
          python-version: 3.x
      - run: pip install --upgrade pip wheel
      - run: pip install .[all]
      - run: black --check --skip-string-normalization . || true
      - run: flake8 .  # See setup.cfg 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
