diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8c0d95..d33538a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: Python package -on: +on: push: pull_request: branches: @@ -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 diff --git a/run b/run index 0bc8f34..24556d1 100755 --- a/run +++ b/run @@ -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: @@ -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():