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

Modify GitHub CI config to install uv via pipx. #86

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Python package

on:
on:
push:
pull_request:
branches:
Expand All @@ -20,5 +20,8 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
run: |
pipx install uv
- name: Run tests
run: python run tests
14 changes: 5 additions & 9 deletions run
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,10 @@ def main(argv):
args = parser.parse_args(argv)

global uv_path
if args.func != run_tests:
# TODO(GH-83): Figure out how to get `uv` installed in the GitHub CI.
uv_path = shutil.which('uv')
if uv_path is None:
print('You need to have `uv` installed to run this script.')
sys.exit(2)
uv_path = shutil.which('uv')
if uv_path is None:
print('You need to have `uv` installed to run this script.')
sys.exit(2)

global run_cmd
if 'VIRTUAL_ENV' in os.environ:
Expand Down Expand Up @@ -292,9 +290,7 @@ def run_regen(args):

def run_tests(args):
del args
# TODO(GH-83): Figure out how to get `uv` installed on the GitHub CI.
# call(run_cmd + ['-m', 'unittest', 'discover', '-p', '*_test.py'])
call([sys.executable, '-m', 'unittest', 'discover', '-p', '*_test.py'])
call(run_cmd + ['-m', 'unittest', 'discover', '-p', '*_test.py'])


def _gen_parser():
Expand Down