# This workflow will install Python dependencies, run tests and lint with a variety of Python versions # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions name: Python package permissions: contents: read on: push: branches: [ main, 7.x, 8.x ] pull_request: branches: [ main, 7.x, 8.x ] jobs: formatting: runs-on: ubuntu-latest timeout-minutes: 5 steps: - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 with: fetch-depth: 0 persist-credentials: false - name: Set up Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 with: python-version: 3.x cache: pip - name: Install uv uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7 - name: Install dependencies run: | # when changing the versions please update CONTRIBUTING.md too uv pip install --system darker==3.0.0 ruff - name: Lint with darker run: | darker --formatter=ruff -r f51c0b1b6b8e48e228a4eaf62dda382f7e4ba0da --check --diff . || ( echo "Changes need auto-formatting. Run:" echo " darker --formatter=ruff -r f51c0b1b6b8e48e228a4eaf62dda382f7e4ba0da ." echo "then commit and push changes to fix." exit 1 )