Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pre-commit-uv #1

Merged
merged 2 commits into from
Oct 23, 2024
Merged

Use pre-commit-uv #1

merged 2 commits into from
Oct 23, 2024

Conversation

hugovk
Copy link
Collaborator

@hugovk hugovk commented Oct 23, 2024

Using pre-commit-uv on GitHub Actions cuts about 20 seconds from the run, compared with regular pre-commit.

For example, 1m 5s -> 44s when no cache: hugovk/norwegianblue#224

It also simplifies the workflow because uvx takes care of installing Python for us as well:

diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index d553e49..07430cb 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -4,7 +4,6 @@ on: [push, pull_request, workflow_dispatch]
 
 env:
   FORCE_COLOR: 1
-  PIP_DISABLE_PIP_VERSION_CHECK: 1
 
 permissions:
   contents: read
@@ -15,8 +14,4 @@ jobs:
 
     steps:
       - uses: actions/checkout@v4
-      - uses: actions/setup-python@v5
-        with:
-          python-version: "3.x"
-          cache: pip
-      - uses: pre-commit/[email protected]
+      - uses: hugovk/[email protected]

@gaborbernat gaborbernat merged commit a071220 into tox-dev:main Oct 23, 2024
2 checks passed
shell: bash
- run: python -m pip freeze --local
shell: bash
- uses: hynek/setup-cached-uv@v2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants