Skip to content

Commit cf82e6d

Browse files
authored
chore: use uv if available in action (#831)
* chore: use uv if available in action Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * ci: use uv on one of the action tests --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent df7ae00 commit cf82e6d

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
]
3232
steps:
3333
- uses: actions/checkout@v4
34+
- uses: yezz123/setup-uv@v4
3435
- uses: ./
3536
- run: nox --non-interactive --error-on-missing-interpreter --session github_actions_default_tests
3637

action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ runs:
5151
def post_setup(self, context):
5252
super().post_setup(context)
5353
self.bin_path = Path(context.env_exe).parent
54-
run([sys.executable, "-m", "pip", "--python", context.env_exe, "install", r"${{ github.action_path }}"], check=True)
54+
if shutil.which("uv") is None:
55+
run([sys.executable, "-m", "pip", "--python", context.env_exe, "install", r"${{ github.action_path }}"], check=True)
56+
else:
57+
run(["uv", "pip", "install", "--python", context.env_exe, r"${{ github.action_path }}"], check=True)
5558
5659
5760
print("::group::Install nox")

0 commit comments

Comments
 (0)