
In order to improve build time performance, this change switches usage of pip to uv. The uv command is a pip alternative promising much faster installs of Python packages. For more information on uv, see: https://github.com/astral-sh/uv Closes: #2748 Signed-off-by: Eric Brown <eric_wade_brown@yahoo.com>
35 lines
1.0 KiB
YAML
35 lines
1.0 KiB
YAML
name: pre-commit
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.id }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
pull_request:
|
|
branches: ['main']
|
|
push:
|
|
# Note even though this job is called "pre-commit" and runs "pre-commit", this job will run
|
|
# also POST-commit on main also! In case there are mishandled merge conflicts / bad auto-resolves
|
|
# when merging into main branch.
|
|
branches: ['main']
|
|
|
|
jobs:
|
|
pre-commit:
|
|
timeout-minutes: 30
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/actions/setup_build_env
|
|
with:
|
|
# running vs. one version of Python is OK
|
|
# i.e. ruff, black, etc.
|
|
python-version: 3.11.5
|
|
run-poetry-install: true
|
|
create-venv-at-path: .venv
|
|
# TODO pre-commit related stuff can be cached too (not a bottleneck yet)
|
|
- run: |
|
|
poetry run uv pip install pre-commit
|
|
poetry run pre-commit run --all-files
|
|
env:
|
|
SKIP: update-pyi-files
|