Skip to content

Commit

Permalink
chore: use uv if available in action (#831)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
henryiii authored May 23, 2024
1 parent df7ae00 commit cf82e6d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
]
steps:
- uses: actions/checkout@v4
- uses: yezz123/setup-uv@v4
- uses: ./
- run: nox --non-interactive --error-on-missing-interpreter --session github_actions_default_tests

Expand Down
5 changes: 4 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ runs:
def post_setup(self, context):
super().post_setup(context)
self.bin_path = Path(context.env_exe).parent
run([sys.executable, "-m", "pip", "--python", context.env_exe, "install", r"${{ github.action_path }}"], check=True)
if shutil.which("uv") is None:
run([sys.executable, "-m", "pip", "--python", context.env_exe, "install", r"${{ github.action_path }}"], check=True)
else:
run(["uv", "pip", "install", "--python", context.env_exe, r"${{ github.action_path }}"], check=True)
print("::group::Install nox")
Expand Down

0 comments on commit cf82e6d

Please sign in to comment.