Skip to content

Fix GitHub CI #84

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

Merged
merged 2 commits into from
Nov 11, 2024
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
2 changes: 1 addition & 1 deletion json5/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = '0.9.27'
__version__ = '0.9.28_dev'

# For backward-compatibility with earlier versions of json5:
VERSION = __version__
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