setup-python/__tests__/finder.test.ts
Sam Gross 9e62be81b2
Some checks failed
Basic validation / Basic validation (push) Failing after 0s
Check dist/ / Check dist/ (push) Failing after 0s
CodeQL analysis / CodeQL analysis (push) Failing after 0s
Licensed / Licensed (push) Failing after 0s
Validate Python e2e / Setup 3.14 macos-latest (push) Has been cancelled
Validate Python e2e / Setup 3.14 ubuntu-latest (push) Has been cancelled
Validate Python e2e / Setup 3.14 windows-latest (push) Has been cancelled
Validate Python e2e / Setup 3.10 macos-13 (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.11 macos-13 (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.12 macos-13 (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.13 macos-13 (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.9 macos-13 (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.10 macos-latest (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.11 macos-latest (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.12 macos-latest (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.13 macos-latest (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.9 macos-latest (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.10 ubuntu-20.04 (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.11 ubuntu-20.04 (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.12 ubuntu-20.04 (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.13 ubuntu-20.04 (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.9 ubuntu-20.04 (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.10 ubuntu-22.04 (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.11 ubuntu-22.04 (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.12 ubuntu-22.04 (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.13 ubuntu-22.04 (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.9 ubuntu-22.04 (noenv) (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-2.7 ubuntu-20.04 (push) Has been cancelled
Validate Python e2e / Setup 3.10 ubuntu-latest (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.11 ubuntu-latest (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.12 ubuntu-latest (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.13 ubuntu-latest (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.9 ubuntu-latest (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.10 windows-latest (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.11 windows-latest (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.12 windows-latest (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.13 windows-latest (noenv) (push) Has been cancelled
Validate Python e2e / Setup 3.9 windows-latest (noenv) (push) Has been cancelled
Validate Python e2e / check-latest (macos-13, 3.10) (push) Has been cancelled
Validate Python e2e / check-latest (macos-13, 3.11) (push) Has been cancelled
Validate Python e2e / check-latest (macos-13, 3.12) (push) Has been cancelled
Validate Python e2e / check-latest (macos-13, 3.13) (push) Has been cancelled
Validate Python e2e / check-latest (macos-13, 3.9) (push) Has been cancelled
Validate Python e2e / check-latest (macos-latest, 3.10) (push) Has been cancelled
Validate Python e2e / check-latest (macos-latest, 3.11) (push) Has been cancelled
Validate Python e2e / check-latest (macos-latest, 3.13) (push) Has been cancelled
Validate Python e2e / check-latest (macos-latest, 3.9) (push) Has been cancelled
Validate Python e2e / check-latest (ubuntu-latest, 3.10) (push) Has been cancelled
Validate Python e2e / check-latest (ubuntu-latest, 3.11) (push) Has been cancelled
Validate Python e2e / check-latest (ubuntu-latest, 3.12) (push) Has been cancelled
Validate Python e2e / check-latest (ubuntu-latest, 3.13) (push) Has been cancelled
Validate Python e2e / check-latest (ubuntu-latest, 3.9) (push) Has been cancelled
Validate Python e2e / check-latest (windows-latest, 3.10) (push) Has been cancelled
Validate Python e2e / check-latest (windows-latest, 3.11) (push) Has been cancelled
e2e-cache / Test pipenv (Python pypy-3.10-v7.x, macos-13) (push) Has been cancelled
Validate Python e2e / check-latest (macos-latest, 3.12) (push) Has been cancelled
e2e-cache / Test pip (Python 3.10, macos-13) (push) Has been cancelled
e2e-cache / Test pip (Python 3.9, macos-13) (push) Has been cancelled
e2e-cache / Test pip (Python pypy-3.10-v7.x, macos-13) (push) Has been cancelled
e2e-cache / Test pip (Python pypy-3.9-v7.x, macos-13) (push) Has been cancelled
e2e-cache / Test pip (Python 3.10, macos-latest) (push) Has been cancelled
e2e-cache / Test pip (Python 3.9, macos-latest) (push) Has been cancelled
e2e-cache / Test pip (Python pypy-3.10-v7.x, macos-latest) (push) Has been cancelled
e2e-cache / Test pip (Python pypy-3.9-v7.x, macos-latest) (push) Has been cancelled
e2e-cache / Test pip (Python 3.10, ubuntu-latest) (push) Has been cancelled
e2e-cache / Test pip (Python 3.9, ubuntu-latest) (push) Has been cancelled
e2e-cache / Test pip (Python pypy-3.10-v7.x, ubuntu-latest) (push) Has been cancelled
e2e-cache / Test pip (Python pypy-3.9-v7.x, ubuntu-latest) (push) Has been cancelled
e2e-cache / Test pip (Python 3.10, windows-latest) (push) Has been cancelled
e2e-cache / Test pip (Python 3.9, windows-latest) (push) Has been cancelled
e2e-cache / Test pip (Python pypy-3.10-v7.x, windows-latest) (push) Has been cancelled
e2e-cache / Test pip (Python pypy-3.9-v7.x, windows-latest) (push) Has been cancelled
e2e-cache / Test pipenv (Python 3.10, macos-13) (push) Has been cancelled
e2e-cache / Test pipenv (Python 3.9, macos-13) (push) Has been cancelled
e2e-cache / Test pip (Python 3.10, macos-13, caching path) (push) Has been cancelled
e2e-cache / Test pip (Python 3.9, macos-13, caching path) (push) Has been cancelled
e2e-cache / Test pip (Python pypy-3.10-v7.x, macos-13, caching path) (push) Has been cancelled
e2e-cache / Test pip (Python pypy-3.9-v7.x, macos-13, caching path) (push) Has been cancelled
e2e-cache / Test pip (Python 3.10, macos-latest, caching path) (push) Has been cancelled
e2e-cache / Test pip (Python 3.9, macos-latest, caching path) (push) Has been cancelled
e2e-cache / Test pip (Python pypy-3.10-v7.x, macos-latest, caching path) (push) Has been cancelled
e2e-cache / Test pip (Python pypy-3.9-v7.x, macos-latest, caching path) (push) Has been cancelled
e2e-cache / Test pipenv (Python pypy-3.9-v7.x, macos-13) (push) Has been cancelled
e2e-cache / Test pipenv (Python 3.10, macos-latest) (push) Has been cancelled
e2e-cache / Test pipenv (Python 3.9, macos-latest) (push) Has been cancelled
e2e-cache / Test pipenv (Python pypy-3.10-v7.x, macos-latest) (push) Has been cancelled
e2e-cache / Test pipenv (Python pypy-3.9-v7.x, macos-latest) (push) Has been cancelled
e2e-cache / Test pipenv (Python 3.10, ubuntu-latest) (push) Has been cancelled
e2e-cache / Test pipenv (Python 3.9, ubuntu-latest) (push) Has been cancelled
e2e-cache / Test pipenv (Python pypy-3.10-v7.x, ubuntu-latest) (push) Has been cancelled
e2e-cache / Test pipenv (Python pypy-3.9-v7.x, ubuntu-latest) (push) Has been cancelled
e2e-cache / Test pipenv (Python 3.10, windows-latest) (push) Has been cancelled
e2e-cache / Test pipenv (Python 3.9, windows-latest) (push) Has been cancelled
e2e-cache / Test pipenv (Python pypy-3.10-v7.x, windows-latest) (push) Has been cancelled
e2e-cache / Test pipenv (Python pypy-3.9-v7.x, windows-latest) (push) Has been cancelled
e2e-cache / Test poetry (Python 3.10, macos-13) (push) Has been cancelled
e2e-cache / Test poetry (Python 3.9, macos-13) (push) Has been cancelled
e2e-cache / Test poetry (Python pypy-3.10-v7.x, macos-13) (push) Has been cancelled
e2e-cache / Test poetry (Python pypy-3.9-v7.x, macos-13) (push) Has been cancelled
e2e-cache / Test poetry (Python 3.10, macos-latest) (push) Has been cancelled
e2e-cache / Test poetry (Python 3.9, macos-latest) (push) Has been cancelled
e2e-cache / Test poetry (Python pypy-3.10-v7.x, macos-latest) (push) Has been cancelled
e2e-cache / Test poetry (Python pypy-3.9-v7.x, macos-latest) (push) Has been cancelled
e2e-cache / Test poetry (Python 3.10, ubuntu-latest) (push) Has been cancelled
e2e-cache / Test poetry (Python 3.9, ubuntu-latest) (push) Has been cancelled
e2e-cache / Test poetry (Python pypy-3.10-v7.x, ubuntu-latest) (push) Has been cancelled
e2e-cache / Test poetry (Python pypy-3.9-v7.x, ubuntu-latest) (push) Has been cancelled
e2e-cache / Test poetry (Python 3.10, windows-latest) (push) Has been cancelled
e2e-cache / Test poetry (Python 3.9, windows-latest) (push) Has been cancelled
e2e-cache / Test poetry (Python pypy-3.10-v7.x, windows-latest) (push) Has been cancelled
e2e-cache / Test poetry (Python pypy-3.9-v7.x, windows-latest) (push) Has been cancelled
e2e-cache / Test pip (Python pypy-3.9-v7.x, windows-latest, caching path) (push) Has been cancelled
e2e-cache / Test pipenv (Python 3.10, macos-13, caching path) (push) Has been cancelled
e2e-cache / Test pipenv (Python 3.9, macos-13, caching path) (push) Has been cancelled
e2e-cache / Test pipenv (Python pypy-3.10-v7.x, macos-13, caching path) (push) Has been cancelled
e2e-cache / Test pipenv (Python pypy-3.9-v7.x, macos-13, caching path) (push) Has been cancelled
e2e-cache / Test pipenv (Python 3.10, macos-latest, caching path) (push) Has been cancelled
e2e-cache / Test pipenv (Python 3.9, macos-latest, caching path) (push) Has been cancelled
e2e-cache / Test pipenv (Python pypy-3.10-v7.x, macos-latest, caching path) (push) Has been cancelled
e2e-cache / Test pipenv (Python pypy-3.9-v7.x, macos-latest, caching path) (push) Has been cancelled
e2e-cache / Test pipenv (Python 3.10, ubuntu-latest, caching path) (push) Has been cancelled
Validate Python e2e / check-latest (windows-latest, 3.12) (push) Has been cancelled
e2e-cache / Test pipenv (Python 3.9, ubuntu-latest, caching path) (push) Has been cancelled
e2e-cache / Test pipenv (Python pypy-3.10-v7.x, ubuntu-latest, caching path) (push) Has been cancelled
e2e-cache / Test pipenv (Python pypy-3.9-v7.x, ubuntu-latest, caching path) (push) Has been cancelled
e2e-cache / Test pipenv (Python 3.10, windows-latest, caching path) (push) Has been cancelled
e2e-cache / Test pipenv (Python 3.9, windows-latest, caching path) (push) Has been cancelled
e2e-cache / Test pipenv (Python pypy-3.10-v7.x, windows-latest, caching path) (push) Has been cancelled
e2e-cache / Test pipenv (Python pypy-3.9-v7.x, windows-latest, caching path) (push) Has been cancelled
Validate Python e2e / check-latest (windows-latest, 3.13) (push) Has been cancelled
e2e tests / Test setup-python (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy-22.3 macos-13 (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy-22.3 macos-latest (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy-22.3 ubuntu-20.04 (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy-22.3 ubuntu-latest (push) Has been cancelled
e2e-cache / Test pip (Python 3.10, ubuntu-latest, caching path) (push) Has been cancelled
e2e-cache / Test pip (Python 3.9, ubuntu-latest, caching path) (push) Has been cancelled
e2e-cache / Test pip (Python pypy-3.10-v7.x, ubuntu-latest, caching path) (push) Has been cancelled
e2e-cache / Test pip (Python pypy-3.9-v7.x, ubuntu-latest, caching path) (push) Has been cancelled
e2e-cache / Test pip (Python 3.10, windows-latest, caching path) (push) Has been cancelled
e2e-cache / Test pip (Python 3.9, windows-latest, caching path) (push) Has been cancelled
e2e-cache / Test pip (Python pypy-3.10-v7.x, windows-latest, caching path) (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy-23.1 ubuntu-20.04 (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy-23.1 ubuntu-latest (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy-24.1 macos-13 (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy-24.1 macos-latest (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy-24.1 ubuntu-20.04 (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy-24.1 ubuntu-latest (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy22.3 macos-13 (noenv) (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy22.3 macos-latest (noenv) (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy22.3 ubuntu-20.04 (noenv) (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy22.3 ubuntu-latest (noenv) (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy23.0 macos-13 (noenv) (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy23.0 macos-latest (noenv) (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy23.0 ubuntu-20.04 (noenv) (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy23.0 ubuntu-latest (noenv) (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy23.1 macos-13 (noenv) (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy23.1 macos-latest (noenv) (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy23.1 ubuntu-20.04 (noenv) (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy23.1 ubuntu-latest (noenv) (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy24.1 macos-13 (noenv) (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy-23.0 macos-13 (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy-23.0 macos-latest (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy-23.0 ubuntu-20.04 (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy-23.0 ubuntu-latest (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy-23.1 macos-13 (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy-23.1 macos-latest (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy24.1 macos-latest (noenv) (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy24.1 ubuntu-20.04 (noenv) (push) Has been cancelled
Validate GraalPy e2e / Setup GraalPy graalpy24.1 ubuntu-latest (noenv) (push) Has been cancelled
Validate GraalPy e2e / check-latest (macos-13) (push) Has been cancelled
Validate GraalPy e2e / check-latest (macos-latest) (push) Has been cancelled
Validate GraalPy e2e / check-latest (ubuntu-latest) (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-2.7 macos-13 (push) Has been cancelled
Validate Python e2e / check-latest (windows-latest, 3.9) (push) Has been cancelled
Validate Python e2e / setup-python-multiple-python-versions (macos-13) (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-2.7-v7.3.12rc1 macos-13 (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-2.7-v7.3.17 macos-13 (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10 macos-13 (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10-nightly macos-13 (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10-v7.3.16 macos-13 (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10-v7.3.17 macos-13 (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10-v7.3.x macos-13 (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10-v7.x macos-13 (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy3.10-v7.3.17 macos-13 (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy3.9 macos-13 (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-2.7 macos-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-2.7-v7.3.12rc1 macos-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-2.7-v7.3.17 macos-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10 macos-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10-nightly macos-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10-v7.3.16 macos-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10-v7.3.17 macos-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10-v7.3.x macos-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10-v7.x macos-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy3.10-v7.3.17 macos-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy3.9 macos-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-2.7 windows-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-2.7-v7.3.12rc1 windows-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-2.7-v7.3.17 windows-latest (push) Has been cancelled
Validate PyPy e2e / Check non-eol pypy-2.7 on ubuntu-22.04 (push) Has been cancelled
Validate PyPy e2e / Check non-eol pypy-3.10 on ubuntu-22.04 (push) Has been cancelled
Validate PyPy e2e / Check non-eol pypy-2.7 on ubuntu-22.04-arm (push) Has been cancelled
Validate PyPy e2e / Check non-eol pypy-3.10 on ubuntu-22.04-arm (push) Has been cancelled
Validate PyPy e2e / Check non-eol pypy-2.7 on ubuntu-24.04 (push) Has been cancelled
Validate PyPy e2e / Check non-eol pypy-3.10 on ubuntu-24.04 (push) Has been cancelled
Validate PyPy e2e / Check non-eol pypy-2.7 on ubuntu-24.04-arm (push) Has been cancelled
Validate PyPy e2e / Check non-eol pypy-3.10 on ubuntu-24.04-arm (push) Has been cancelled
Validate PyPy e2e / Check non-eol pypy-2.7 on windows-2019 (push) Has been cancelled
Validate PyPy e2e / Check non-eol pypy-3.10 on windows-2019 (push) Has been cancelled
Validate Python e2e / setup-python-multiple-python-versions (windows-latest) (push) Has been cancelled
Validate PyPy e2e / Check non-eol pypy-2.7 on windows-2022 (push) Has been cancelled
Validate PyPy e2e / Check non-eol pypy-3.10 on windows-2022 (push) Has been cancelled
Validate PyPy e2e / Check non-eol pypy-2.7 on windows-2025 (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-2.7-v7.3.12rc1 ubuntu-20.04 (push) Has been cancelled
Validate Python e2e / setup-python-multiple-python-versions (macos-latest) (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-2.7-v7.3.17 ubuntu-20.04 (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10 ubuntu-20.04 (push) Has been cancelled
Validate Python e2e / setup-python-multiple-python-versions (ubuntu-latest) (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10-nightly ubuntu-20.04 (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10-v7.3.16 ubuntu-20.04 (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10-v7.3.17 ubuntu-20.04 (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10-v7.3.x ubuntu-20.04 (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10-v7.x ubuntu-20.04 (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy3.10-v7.3.17 ubuntu-20.04 (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy3.9 ubuntu-20.04 (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-2.7 ubuntu-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-2.7-v7.3.12rc1 ubuntu-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-2.7-v7.3.17 ubuntu-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10 ubuntu-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10-nightly ubuntu-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10-v7.3.16 ubuntu-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10-v7.3.17 ubuntu-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10-v7.3.x ubuntu-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10-v7.x ubuntu-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy3.10-v7.3.17 ubuntu-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy3.9 ubuntu-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10 windows-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10-nightly windows-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10-v7.3.16 windows-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10-v7.3.17 windows-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10-v7.3.x windows-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy-3.10-v7.x windows-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy3.10-v7.3.17 windows-latest (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy3.9 windows-latest (push) Has been cancelled
Validate PyPy e2e / Check non-eol pypy-2.7 on macos-13 (push) Has been cancelled
Validate PyPy e2e / Check non-eol pypy-3.10 on macos-13 (push) Has been cancelled
Validate PyPy e2e / Check non-eol pypy-2.7 on macos-14 (push) Has been cancelled
Validate PyPy e2e / Check non-eol pypy-3.10 on macos-14 (push) Has been cancelled
Validate PyPy e2e / Check non-eol pypy-2.7 on macos-15 (push) Has been cancelled
Validate PyPy e2e / Check non-eol pypy-3.10 on macos-15 (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy2.7 macos-13 (noenv) (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy3.10-nightly macos-13 (noenv) (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy3.9 macos-13 (noenv) (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy2.7 macos-latest (noenv) (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy3.10-nightly macos-latest (noenv) (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy3.9 macos-latest (noenv) (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy2.7 ubuntu-20.04 (noenv) (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy3.10-nightly ubuntu-20.04 (noenv) (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy3.9 ubuntu-20.04 (noenv) (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy2.7 ubuntu-latest (noenv) (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy3.10-nightly ubuntu-latest (noenv) (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy3.9 ubuntu-latest (noenv) (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy2.7 windows-latest (noenv) (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy3.10-nightly windows-latest (noenv) (push) Has been cancelled
Validate PyPy e2e / Setup PyPy pypy3.9 windows-latest (noenv) (push) Has been cancelled
Validate PyPy e2e / Check non-eol pypy-3.10 on windows-2025 (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 macos-13 (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 macos-13 (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 macos-latest (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 macos-latest (push) Has been cancelled
Validate Python e2e / Setup 3.12.3 macos-latest (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 macos-latest (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 macos-latest (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 ubuntu-20.04 (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 ubuntu-20.04 (push) Has been cancelled
Validate Python e2e / Setup 3.12.3 ubuntu-20.04 (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 ubuntu-20.04 (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 ubuntu-20.04 (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 ubuntu-22.04 (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 ubuntu-22.04 (push) Has been cancelled
Validate Python e2e / Setup 3.12.3 ubuntu-22.04 (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 ubuntu-22.04 (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 ubuntu-22.04 (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 ubuntu-latest (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 ubuntu-latest (push) Has been cancelled
Validate Python e2e / Setup 3.12.3 ubuntu-latest (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 ubuntu-latest (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 ubuntu-latest (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 windows-latest (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 windows-latest (push) Has been cancelled
Validate Python e2e / Setup 3.12.3 windows-latest (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 windows-latest (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 windows-latest (push) Has been cancelled
Validate PyPy e2e / check-latest (macos-13) (push) Has been cancelled
Validate PyPy e2e / check-latest (macos-latest) (push) Has been cancelled
Validate PyPy e2e / check-latest (ubuntu-latest) (push) Has been cancelled
Validate PyPy e2e / check-latest (windows-latest) (push) Has been cancelled
Validate PyPy e2e / setup-pypy-multiple-versions (macos-13) (push) Has been cancelled
Validate PyPy e2e / setup-pypy-multiple-versions (macos-latest) (push) Has been cancelled
Validate PyPy e2e / setup-pypy-multiple-versions (ubuntu-latest) (push) Has been cancelled
Validate PyPy e2e / setup-pypy-multiple-versions (windows-latest) (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 macos-13 (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 macos-13 (push) Has been cancelled
Validate Python e2e / Setup 3.12.3 macos-13 (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 ubuntu-22.04 version file (push) Has been cancelled
Validate Python e2e / Setup 3.12.3 ubuntu-22.04 version file (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 ubuntu-22.04 version file (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 ubuntu-22.04 version file (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 ubuntu-latest version file (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 ubuntu-latest version file (push) Has been cancelled
Validate Python e2e / Setup 3.12.3 macos-latest version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 macos-latest version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 macos-latest version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 ubuntu-20.04 version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 ubuntu-20.04 version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.12.3 ubuntu-20.04 version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 ubuntu-22.04 version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.12.3 ubuntu-22.04 version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 ubuntu-22.04 version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 macos-13 version file (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 macos-13 version file (push) Has been cancelled
Validate Python e2e / Setup 3.12.3 macos-13 version file (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 macos-13 version file (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 macos-13 version file (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 macos-latest version file (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 macos-latest version file (push) Has been cancelled
Validate Python e2e / Setup 3.12.3 macos-latest version file (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 macos-latest version file (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 macos-latest version file (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 ubuntu-20.04 version file (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 ubuntu-20.04 version file (push) Has been cancelled
Validate Python e2e / Setup 3.12.3 ubuntu-20.04 version file (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 ubuntu-20.04 version file (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 ubuntu-20.04 version file (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 ubuntu-22.04 version file (push) Has been cancelled
Validate Python e2e / Setup 3.12.3 ubuntu-latest version file (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 ubuntu-latest version file (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 ubuntu-latest version file (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 windows-latest version file (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 windows-latest version file (push) Has been cancelled
Validate Python e2e / Setup 3.12.3 windows-latest version file (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 windows-latest version file (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 windows-latest version file (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 macos-13 version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 macos-13 version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.12.3 macos-13 version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 macos-13 version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 macos-13 version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 macos-latest version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 macos-latest version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 ubuntu-20.04 version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 ubuntu-20.04 version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 ubuntu-22.04 version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 macos-latest standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 macos-latest standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup ==3.12.3 macos-latest standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 ubuntu-20.04 standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 ubuntu-20.04 standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 ubuntu-20.04 standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 ubuntu-20.04 standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup ==3.12.3 ubuntu-20.04 standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 ubuntu-22.04 standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 ubuntu-22.04 standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 ubuntu-22.04 standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 ubuntu-22.04 standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup ==3.12.3 ubuntu-22.04 standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 ubuntu-latest standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 ubuntu-latest standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 ubuntu-latest standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.14.0-alpha.1 windows-latest (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 ubuntu-22.04 version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 ubuntu-latest version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 ubuntu-latest version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.12.3 ubuntu-latest version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 ubuntu-latest version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 ubuntu-latest version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 windows-latest version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 windows-latest version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.12.3 windows-latest version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 windows-latest version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 windows-latest version file without parameter (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 macos-13 standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 macos-13 standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 macos-13 standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 macos-13 standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup ==3.12.3 macos-13 standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 macos-latest standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 macos-latest standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 ubuntu-latest standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup ==3.12.3 ubuntu-latest standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 windows-latest standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 windows-latest standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 windows-latest standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 windows-latest standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup ==3.12.3 windows-latest standard pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 macos-13 poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 macos-13 poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.12.3 macos-13 poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 macos-13 poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 macos-13 poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 macos-latest poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 macos-latest poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.12.3 macos-latest poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 macos-latest poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 macos-latest poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 ubuntu-20.04 poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 ubuntu-20.04 poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.12.3 ubuntu-20.04 poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 ubuntu-20.04 poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 ubuntu-20.04 poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 ubuntu-22.04 poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 ubuntu-22.04 poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.12.3 ubuntu-22.04 poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 ubuntu-22.04 poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 ubuntu-22.04 poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 ubuntu-latest poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 ubuntu-latest poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.12.3 ubuntu-latest poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 ubuntu-latest poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 ubuntu-latest poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.14-dev macos-13 (push) Has been cancelled
Validate Python e2e / Setup 3.10.11 windows-latest poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.11.9 windows-latest poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.12.3 windows-latest poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.13.0 windows-latest poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.9.13 windows-latest poetry pyproject file (push) Has been cancelled
Validate Python e2e / Setup 3.14.0-alpha.1 macos-13 (push) Has been cancelled
Validate Python e2e / Setup 3.14.0-alpha.1 macos-latest (push) Has been cancelled
Validate Python e2e / Setup 3.14.0-alpha.1 ubuntu-20.04 (push) Has been cancelled
Validate Python e2e / Setup 3.14.0-alpha.1 ubuntu-22.04 (push) Has been cancelled
Validate Python e2e / Setup 3.14.0-alpha.1 ubuntu-latest (push) Has been cancelled
Validate Python e2e / Setup 3.14-dev macos-latest (push) Has been cancelled
Validate Python e2e / Setup 3.14-dev ubuntu-latest (push) Has been cancelled
Validate Python e2e / Setup 3.14-dev windows-latest (push) Has been cancelled
Validate Python e2e / Setup 3.14 macos-13 (push) Has been cancelled
Support free threaded Python versions like '3.13t' (#973)
* Support free threaded Python versions like '3.13t'

Python wheels, pyenv, and a number of other tools use 't' in the Python
version number to identify free threaded builds. For example, '3.13t',
'3.14.0a1', '3.14t-dev'.

This PR supports that syntax in `actions/setup-python`, strips the "t",
and adds "-freethreading" to the architecture to select the correct
Python version.

See #771

* Add free threading to advanced usage documentation

* Fix desugaring of `3.13.1t` and add test case.

* Add freethreaded input and fix handling of prerelease versions

* Fix lint

* Add 't' suffix to python-version output

* Use distinct cache key for free threaded Python

* Remove support for syntax like '3.14.0a1'

* Clarify use of 't' suffix

* Improve error message when trying to use free threaded Python versions before 3.13
2025-03-04 16:49:43 -06:00

301 lines
10 KiB
TypeScript

import * as io from '@actions/io';
import os from 'os';
import fs from 'fs';
import path from 'path';
const toolDir = path.join(
__dirname,
'runner',
path.join(Math.random().toString(36).substring(7)),
'tools'
);
const tempDir = path.join(
__dirname,
'runner',
path.join(Math.random().toString(36).substring(7)),
'temp'
);
process.env['RUNNER_TOOL_CACHE'] = toolDir;
process.env['RUNNER_TEMP'] = tempDir;
import * as tc from '@actions/tool-cache';
import * as core from '@actions/core';
import * as finder from '../src/find-python';
import * as installer from '../src/install-python';
import manifestData from './data/versions-manifest.json';
describe('Finder tests', () => {
let writeSpy: jest.SpyInstance;
let spyCoreAddPath: jest.SpyInstance;
let spyCoreExportVariable: jest.SpyInstance;
const env = process.env;
beforeEach(() => {
writeSpy = jest.spyOn(process.stdout, 'write');
writeSpy.mockImplementation(() => {});
jest.resetModules();
process.env = {...env};
spyCoreAddPath = jest.spyOn(core, 'addPath');
spyCoreExportVariable = jest.spyOn(core, 'exportVariable');
});
afterEach(() => {
jest.resetAllMocks();
jest.clearAllMocks();
jest.restoreAllMocks();
process.env = env;
});
it('Finds Python if it is installed', async () => {
const getBooleanInputSpy = jest.spyOn(core, 'getBooleanInput');
getBooleanInputSpy.mockImplementation(input => false);
const pythonDir: string = path.join(toolDir, 'Python', '3.0.0', 'x64');
await io.mkdirP(pythonDir);
fs.writeFileSync(`${pythonDir}.complete`, 'hello');
// This will throw if it doesn't find it in the cache and in the manifest (because no such version exists)
await finder.useCpythonVersion('3.x', 'x64', true, false, false, false);
expect(spyCoreAddPath).toHaveBeenCalled();
expect(spyCoreExportVariable).toHaveBeenCalledWith(
'pythonLocation',
expect.anything()
);
expect(spyCoreExportVariable).toHaveBeenCalledWith(
'PKG_CONFIG_PATH',
expect.anything()
);
});
it('Finds Python if it is installed without environment update', async () => {
const pythonDir: string = path.join(toolDir, 'Python', '3.0.0', 'x64');
await io.mkdirP(pythonDir);
fs.writeFileSync(`${pythonDir}.complete`, 'hello');
// This will throw if it doesn't find it in the cache and in the manifest (because no such version exists)
await finder.useCpythonVersion('3.x', 'x64', false, false, false, false);
expect(spyCoreAddPath).not.toHaveBeenCalled();
expect(spyCoreExportVariable).not.toHaveBeenCalled();
});
it('Finds stable Python version if it is not installed, but exists in the manifest', async () => {
const findSpy: jest.SpyInstance = jest.spyOn(tc, 'getManifestFromRepo');
findSpy.mockImplementation(() => <tc.IToolRelease[]>manifestData);
const getBooleanInputSpy = jest.spyOn(core, 'getBooleanInput');
getBooleanInputSpy.mockImplementation(input => false);
const installSpy: jest.SpyInstance = jest.spyOn(
installer,
'installCpythonFromRelease'
);
installSpy.mockImplementation(async () => {
const pythonDir: string = path.join(toolDir, 'Python', '1.2.3', 'x64');
await io.mkdirP(pythonDir);
fs.writeFileSync(`${pythonDir}.complete`, 'hello');
});
// This will throw if it doesn't find it in the cache and in the manifest (because no such version exists)
await expect(
finder.useCpythonVersion('1.2.3', 'x64', true, false, false, false)
).resolves.toEqual({
impl: 'CPython',
version: '1.2.3'
});
expect(spyCoreAddPath).toHaveBeenCalled();
expect(spyCoreExportVariable).toHaveBeenCalledWith(
'pythonLocation',
expect.anything()
);
expect(spyCoreExportVariable).toHaveBeenCalledWith(
'PKG_CONFIG_PATH',
expect.anything()
);
});
it('Finds pre-release Python version in the manifest', async () => {
const findSpy: jest.SpyInstance = jest.spyOn(tc, 'getManifestFromRepo');
findSpy.mockImplementation(() => <tc.IToolRelease[]>manifestData);
const getBooleanInputSpy = jest.spyOn(core, 'getBooleanInput');
getBooleanInputSpy.mockImplementation(input => false);
const installSpy: jest.SpyInstance = jest.spyOn(
installer,
'installCpythonFromRelease'
);
installSpy.mockImplementation(async () => {
const pythonDir: string = path.join(
toolDir,
'Python',
'1.2.4-beta.2',
'x64'
);
await io.mkdirP(pythonDir);
fs.writeFileSync(`${pythonDir}.complete`, 'hello');
});
// This will throw if it doesn't find it in the manifest (because no such version exists)
await expect(
finder.useCpythonVersion(
'1.2.4-beta.2',
'x64',
false,
false,
false,
false
)
).resolves.toEqual({
impl: 'CPython',
version: '1.2.4-beta.2'
});
});
it('Check-latest true, finds the latest version in the manifest', async () => {
const findSpy: jest.SpyInstance = jest.spyOn(tc, 'getManifestFromRepo');
findSpy.mockImplementation(() => <tc.IToolRelease[]>manifestData);
const getBooleanInputSpy = jest.spyOn(core, 'getBooleanInput');
getBooleanInputSpy.mockImplementation(input => true);
const cnSpy: jest.SpyInstance = jest.spyOn(process.stdout, 'write');
cnSpy.mockImplementation(line => {
// uncomment to debug
// process.stderr.write('write:' + line + '\n');
});
const addPathSpy: jest.SpyInstance = jest.spyOn(core, 'addPath');
addPathSpy.mockImplementation(() => null);
const infoSpy: jest.SpyInstance = jest.spyOn(core, 'info');
infoSpy.mockImplementation(() => {});
const debugSpy: jest.SpyInstance = jest.spyOn(core, 'debug');
debugSpy.mockImplementation(() => {});
const pythonDir: string = path.join(toolDir, 'Python', '1.2.2', 'x64');
const expPath: string = path.join(toolDir, 'Python', '1.2.3', 'x64');
const installSpy: jest.SpyInstance = jest.spyOn(
installer,
'installCpythonFromRelease'
);
installSpy.mockImplementation(async () => {
await io.mkdirP(expPath);
fs.writeFileSync(`${expPath}.complete`, 'hello');
});
const tcFindSpy: jest.SpyInstance = jest.spyOn(tc, 'find');
tcFindSpy
.mockImplementationOnce(() => '')
.mockImplementationOnce(() => expPath);
await io.mkdirP(pythonDir);
await io.rmRF(path.join(toolDir, 'Python', '1.2.3'));
fs.writeFileSync(`${pythonDir}.complete`, 'hello');
// This will throw if it doesn't find it in the cache and in the manifest (because no such version exists)
await finder.useCpythonVersion('1.2', 'x64', true, true, false, false);
expect(infoSpy).toHaveBeenCalledWith("Resolved as '1.2.3'");
expect(infoSpy).toHaveBeenCalledWith(
'Version 1.2.3 was not found in the local cache'
);
expect(infoSpy).toHaveBeenCalledWith(
'Version 1.2.3 is available for downloading'
);
expect(installSpy).toHaveBeenCalled();
expect(addPathSpy).toHaveBeenCalledWith(expPath);
await finder.useCpythonVersion(
'1.2.4-beta.2',
'x64',
false,
true,
false,
false
);
expect(spyCoreAddPath).toHaveBeenCalled();
expect(spyCoreExportVariable).toHaveBeenCalledWith(
'pythonLocation',
expect.anything()
);
expect(spyCoreExportVariable).toHaveBeenCalledWith(
'PKG_CONFIG_PATH',
expect.anything()
);
});
it('Finds stable Python version if it is not installed, but exists in the manifest, skipping newer pre-release', async () => {
const findSpy: jest.SpyInstance = jest.spyOn(tc, 'getManifestFromRepo');
findSpy.mockImplementation(() => <tc.IToolRelease[]>manifestData);
const installSpy: jest.SpyInstance = jest.spyOn(
installer,
'installCpythonFromRelease'
);
installSpy.mockImplementation(async () => {
const pythonDir: string = path.join(toolDir, 'Python', '1.2.3', 'x64');
await io.mkdirP(pythonDir);
fs.writeFileSync(`${pythonDir}.complete`, 'hello');
});
// This will throw if it doesn't find it in the cache and in the manifest (because no such version exists)
await expect(
finder.useCpythonVersion('1.2', 'x64', false, false, false, false)
).resolves.toEqual({
impl: 'CPython',
version: '1.2.3'
});
});
it('Finds Python version if it is not installed, but exists in the manifest, pre-release fallback', async () => {
const findSpy: jest.SpyInstance = jest.spyOn(tc, 'getManifestFromRepo');
findSpy.mockImplementation(() => <tc.IToolRelease[]>manifestData);
const installSpy: jest.SpyInstance = jest.spyOn(
installer,
'installCpythonFromRelease'
);
installSpy.mockImplementation(async () => {
const pythonDir: string = path.join(
toolDir,
'Python',
'1.1.0-beta.2',
'x64'
);
await io.mkdirP(pythonDir);
fs.writeFileSync(`${pythonDir}.complete`, 'hello');
});
// This will throw if it doesn't find it in the cache and in the manifest (because no such version exists)
await expect(
finder.useCpythonVersion('1.1', 'x64', false, false, false, false)
).rejects.toThrow();
await expect(
finder.useCpythonVersion('1.1', 'x64', false, false, true, false)
).resolves.toEqual({
impl: 'CPython',
version: '1.1.0-beta.2'
});
// Check 1.1.0 version specifier does not fallback to '1.1.0-beta.2'
await expect(
finder.useCpythonVersion('1.1.0', 'x64', false, false, true, false)
).rejects.toThrow();
});
it('Errors if Python is not installed', async () => {
// This will throw if it doesn't find it in the cache and in the manifest (because no such version exists)
let thrown = false;
try {
await finder.useCpythonVersion(
'3.300000',
'x64',
true,
false,
false,
false
);
} catch {
thrown = true;
}
expect(thrown).toBeTruthy();
expect(spyCoreAddPath).not.toHaveBeenCalled();
expect(spyCoreExportVariable).not.toHaveBeenCalled();
});
});