mirror of
https://code.forgejo.org/actions/setup-python
synced 2025-06-08 04:18:19 +02:00
Adding support for more PyPy versions and installing them on-flight (#168)
* add support to install pypy * resolved comments, update readme, add e2e tests. * resolve throw error * Add pypy unit tests to cover code * add tests * Update test-pypy.yml * Update test-python.yml * Update test-python.yml * Update README.md * fixing tests * change order Co-authored-by: Maxim Lobanov <v-malob@microsoft.com> * add pypy tests and fix issue with pypy-3-nightly Co-authored-by: Maxim Lobanov <v-malob@microsoft.com>
This commit is contained in:
parent
2831efe49a
commit
8c5ea631b2
14 changed files with 1896 additions and 34 deletions
34
__tests__/utils.test.ts
Normal file
34
__tests__/utils.test.ts
Normal file
|
@ -0,0 +1,34 @@
|
|||
import {
|
||||
validateVersion,
|
||||
validatePythonVersionFormatForPyPy
|
||||
} from '../src/utils';
|
||||
|
||||
describe('validatePythonVersionFormatForPyPy', () => {
|
||||
it.each([
|
||||
['3.6', true],
|
||||
['3.7', true],
|
||||
['3.6.x', false],
|
||||
['3.7.x', false],
|
||||
['3.x', false],
|
||||
['3', false]
|
||||
])('%s -> %s', (input, expected) => {
|
||||
expect(validatePythonVersionFormatForPyPy(input)).toEqual(expected);
|
||||
});
|
||||
});
|
||||
|
||||
describe('validateVersion', () => {
|
||||
it.each([
|
||||
['v7.3.3', true],
|
||||
['v7.3.x', true],
|
||||
['v7.x', true],
|
||||
['x', true],
|
||||
['v7.3.3-rc.1', true],
|
||||
['nightly', true],
|
||||
['v7.3.b', false],
|
||||
['3.6', true],
|
||||
['3.b', false],
|
||||
['3', true]
|
||||
])('%s -> %s', (input, expected) => {
|
||||
expect(validateVersion(input)).toEqual(expected);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue