Skip to content

Commit

Permalink
Skip uv when running tests.
Browse files Browse the repository at this point in the history
GH-83 `uv` isn't installed by default in the GitHub Ubuntu-latest
environment, so we can't use it when running tests. We need to figure
out how to get it installed, but for now we'll just change the
script to run tests w/o `uv`.
  • Loading branch information
dpranke committed Nov 11, 2024
1 parent bb76db7 commit 68b92fb
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions run
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,12 @@ def main(argv):
args = parser.parse_args(argv)

global uv_path
uv_path = shutil.which('uv')
if uv_path is None:
print('You need to have `uv` installed to run this script.')
sys.exit(2)
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)

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

def run_tests(args):
del args
call(run_cmd + ['-m', 'unittest', 'discover', '-p', '*_test.py'])
# 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'])


def _gen_parser():
Expand Down

0 comments on commit 68b92fb

Please sign in to comment.