8000 Merge branch 'actions:main' into main · actions/setup-python@0f55918 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0f55918

Browse files
authored
Merge branch 'actions:main' into main
2 parents 2cff867 + e8111ce commit 0f55918

35 files changed

+15681
-7678
lines changed

.eslintrc.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = {
77
'eslint-config-prettier'
88
],
99
parser: '@typescript-eslint/parser',
10-
plugins: ['@typescript-eslint', 'eslint-plugin-jest'],
10+
plugins: ['@typescript-eslint', 'eslint-plugin-node', 'eslint-plugin-jest'],
1111
rules: {
1212
'@typescript-eslint/no-require-imports': 'error',
1313
'@typescript-eslint/no-non-null-assertion': 'off',
@@ -28,7 +28,8 @@ module.exports = {
2828
}
2929
],
3030
'no-control-regex': 'off',
31-
'no-constant-condition': ['error', {checkLoops: false}]
31+
'no-constant-condition': ['error', {checkLoops: false}],
32+
'node/no-extraneous-import': 'error'
3233
},
3334
overrides: [
3435
{

.github/workflows/e2e-cache.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,30 @@ jobs:
4343
steps:
4444
- uses: actions/checkout@v3
4545
- name: Setup Python
46+
id: cache-pipenv
4647
uses: ./
4748
with:
4849
python-version: ${{ matrix.python-version }}
4950
cache: 'pipenv'
5051
- name: Install pipenv
5152
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
52-
- name: Install dependencies
53+
- name: Prepare environment
5354
shell: pwsh
5455
run: |
5556
mv ./__tests__/data/Pipfile.lock .
5657
mv ./__tests__/data/Pipfile .
58+
mv ./__tests__/test-pipenv.py .
59+
- name: Install dependencies
60+
shell: pwsh
61+
if: steps.cache-pipenv.outputs.cache-hit != 'true'
62+
run: |
5763
if ("${{ matrix.python-version }}" -Match "pypy") {
58-
pipenv install --keep-outdated --python pypy
64+
pipenv install --python pypy # --keep-outdated
5965
} else {
60-
pipenv install --keep-outdated --python ${{ matrix.python-version }}
66+
pipenv install --python ${{ matrix.python-version }} # --keep-outdated
6167
}
68+
- name: Run Python Script
69+
run: pipenv run python test-pipenv.py
6270

6371
python-poetry-dependencies-caching:
6472
name: Test poetry (Python ${{ matrix.python-version}}, ${{ matrix.os }})
@@ -112,20 +120,28 @@ jobs:
112120
steps:
113121
- uses: actions/checkout@v3
114122
- name: Setup Python
123+
id: cache-pipenv
115124
uses: ./
116125
with:
117126
python-version: ${{ matrix.python-version }}
118127
cache: 'pipenv'
119128
cache-dependency-path: '**/pipenv-requirements.txt'
120129
- name: Install pipenv
121130
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
122-
- name: Install dependencies
131+
- name: Prepare environment
123132
shell: pwsh
124133
run: |
125134
mv ./__tests__/data/Pipfile.lock .
126135
mv ./__tests__/data/Pipfile .
136+
mv ./__tests__/test-pipenv.py .
137+
- name: Install dependencies
138+
shell: pwsh
139+
if: steps.cache-pipenv.outputs.cache-hit != 'true'
140+
run: |
127141
if ("${{ matrix.python-version }}" -Match "pypy") {
128-
pipenv install --keep-outdated --python pypy
142+
pipenv install --python pypy # --keep-outdated
129143
} else {
130-
pipenv install --keep-outdated --python ${{ matrix.python-version }}
144+
pipenv install --python ${{ matrix.python-version }} # --keep-outdated
131145
}
146+
- name: Run Python Script
147+
run: pipenv run python test-pipenv.py

.github/workflows/e2e-tests.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@ jobs:
2121
- name: Checkout
2222
uses: actions/checkout@v3
2323

24-
- name: Run with setup-python 2.7
25-
uses: ./
26-
with:
27-
python-version: 2.7
28-
- name: Verify 2.7
29-
run: python __tests__/verify-python.py 2.7
30-
3124
- name: Run with setup-python 3.5
3225
uses: ./
3326
with:
@@ -86,3 +79,17 @@ jobs:
8679
run: python __tests__/verify-python.py 3.10
8780
- name: Run python-path sample 3.10
8881
run: pipx run --python '${{ steps.cp310.outputs.python-path }}' nox --version
82+
83+
- name: Run with setup-python ==3.8
84+
uses: ./
85+
with:
86+
python-version: '==3.8'
87+
- name: Verify ==3.8
88+
run: python __tests__/verify-python.py 3.8
89+
90+
- name: Run with setup-python <3.11
91+
uses: ./
92+
with:
93+
python-version: '<3.11'
94+
- name: Verify <3.11
95+
run: python __tests__/verify-python.py 3.10

.github/workflows/test-graalpy.yml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: Validate GraalPy e2e
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- '**.md'
9+
pull_request:
10+
paths-ignore:
11+
- '**.md'
12+
13+
jobs:
14+
setup-graalpy:
15+
name: Setup GraalPy ${{ matrix.graalpy }} ${{ matrix.os }}
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os: [macos-latest, ubuntu-20.04, ubuntu-latest]
21+
graalpy:
22+
- 'graalpy-23.0'
23+
- 'graalpy-22.3'
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v3
28+
29+
- name: setup-python ${{ matrix.graalpy }}
30+
id: setup-python
31+
uses: ./
32+
with:
33+
python-version: ${{ matrix.graalpy }}
34+
35+
- name: Check python-path
36+
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
37+
shell: bash
38+
39+
- name: GraalPy and Python version
40+
run: python --version
41+
42+
- name: Run simple code
43+
run: python -c 'import math; print(math.factorial(5))'
44+
45+
- name: Assert GraalPy is running
46+
run: |
47+
import platform
48+
assert platform.python_implementation().lower() == "graalvm"
49+
shell: python
50+
51+
- name: Assert expected binaries (or symlinks) are present
52+
run: |
53+
EXECUTABLE=${{ matrix.graalpy }}
54+
EXECUTABLE=${EXECUTABLE/graalpy-/graalpy} # remove the first '-' in "graalpy-X.Y" -> "graalpyX.Y" to match executable name
55+
EXECUTABLE=${EXECUTABLE%%-*} # remove any -* suffixe
56+
${EXECUTABLE} --version
57+
shell: bash
58+
59+
setup-graalpy-noenv:
60+
name: Setup GraalPy ${{ matrix.graalpy }} ${{ matrix.os }} (noenv)
61+
runs-on: ${{ matrix.os }}
62+
strategy:
63+
fail-fast: false
64+
matrix:
65+
os: [macos-latest, ubuntu-20.04, ubuntu-latest]
66+
graalpy: ['graalpy23.0', 'graalpy22.3']
67+
68+
steps:
69+
- name: Checkout
70+
uses: actions/checkout@v3
71+
72+
- name: setup-python ${{ matrix.graalpy }}
73+
id: setup-python
74+
uses: ./
75+
with:
76+
python-version: ${{ matrix.graalpy }}
77+
update-environment: false
78+
79+
- name: GraalPy and Python version
80+
run: ${{ steps.setup-python.outputs.python-path }} --version
81+
82+
- name: Run simple code
83+
run: ${{ steps.setup-python.outputs.python-path }} -c 'import math; print(math.factorial(5))'
84+
85+
check-latest:
86+
runs-on: ${{ matrix.os }}
87+
strategy:
88+
fail-fast: false
89+
matrix:
90+
os: [ubuntu-latest, macos-latest]
91+
steps:
92+
- uses: actions/checkout@v3
93+
- name: Setup GraalPy and check latest
94+
uses: ./
95+
id: graalpy
96+
with:
97+
python-version: 'graalpy-23.x'
98+
check-latest: true
99+
- name: GraalPy and Python version
100+
run: python --version
101+
102+
- name: Run simple code
103+
run: python -c 'import math; print(math.factorial(5))'
104+
105+
- name: Assert GraalPy is running
106+
run: |
107+
import platform
108+
assert platform.python_implementation().lower() == "graalvm"
109+
shell: python
110+
111+
- name: Assert expected binaries (or symlinks) are present
112+
run: |
113+
EXECUTABLE='${{ steps.graalpy.outputs.python-version }}'
114+
EXECUTABLE="${EXECUTABLE%.*}"
115+
${EXECUTABLE} --version
116+
shell: bash

.github/workflows/test-python.yml

Lines changed: 146 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,152 @@ jobs:
8686
id: setup-python
8787
uses: ./
8888
with:
89-
python-version-file: '.python-version'
89+
python-version-file: .python-version
90+
91+
- name: Check python-path
92+
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
93+
shell: bash
94+
95+
- name: Validate version
96+
run: |
97+
$pythonVersion = (python --version)
98+
if ("Python ${{ matrix.python }}" -ne "$pythonVersion"){
99+
Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python }}"
100+
exit 1
101+
}
102+
$pythonVersion
103+
shell: pwsh
104+
105+
- name: Run simple code
106+
run: python -c 'import math; print(math.factorial(5))'
107+
108+
setup-versions-from-file-without-parameter:
109+
name: Setup ${{ matrix.python }} ${{ matrix.os }} version file without parameter
110+
runs-on: ${{ matrix.os }}
111+
strategy:
112+
fail-fast: false
113+
matrix:
114+
os: [macos-latest, windows-latest, ubuntu-20.04, ubuntu-22.04]
115+
python: [3.5.4, 3.6.7, 3.7.5, 3.8.15, 3.9.13]
116+
exclude:
117+
- os: ubuntu-22.04
118+
python: 3.5.4
119+
- os: ubuntu-22.04
120+
python: 3.6.7
121+
- os: ubuntu-22.04
122+
python: 3.7.5
123+
- os: windows-latest
124+
python: 3.8.15
125+
steps:
126+
- name: Checkout
127+
uses: actions/checkout@v3
128+
129+
- name: build-version-file ${{ matrix.python }}
130+
run: echo ${{ matrix.python }} > .python-version
131+
132+
- name: setup-python ${{ matrix.python }}
133+
id: setup-python
134+
uses: ./
135+
136+
- name: Check python-path
137+
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
138+
shell: bash
139+
140+
- name: Validate version
141+
run: |
142+
$pythonVersion = (python --version)
143+
if ("Python ${{ matrix.python }}" -ne "$pythonVersion"){
144+
Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python }}"
145+
exit 1
146+
}
147+
$pythonVersion
148+
shell: pwsh
149+
150+
- name: Run simple code
151+
run: python -c 'import math; print(math.factorial(5))'
152+
153+
setup-versions-from-standard-pyproject-file:
154+
name: Setup ${{ matrix.python }} ${{ matrix.os }} standard pyproject file
155+
runs-on: ${{ matrix.os }}
156+
strategy:
157+
fail-fast: false
158+
matrix:
159+
os: [macos-latest, windows-latest, ubuntu-20.04, ubuntu-22.04]
160+
python: [3.5.4, 3.6.7, 3.7.5, 3.8.15, 3.9.13, '==3.10.10']
161+
exclude:
162+
- os: ubuntu-22.04
163+
python: 3.5.4
164+
- os: ubuntu-22.04
165+
python: 3.6.7
166+
- os: ubuntu-22.04
167+
python: 3.7.5
168+
- os: windows-latest
169+
python: 3.8.15
170+
steps:
171+
- name: Checkout
172+
uses: actions/checkout@v3
173+
174+
- name: build-version-file ${{ matrix.python }}
175+
run: |
176+
echo '[project]
177+
requires-python = "${{ matrix.python }}"
178+
' > pyproject.toml
179+
180+
- name: setup-python ${{ matrix.python }}
181+
id: setup-python
182+
uses: ./
183+
with:
184+
python-version-file: pyproject.toml
185+
186+
- name: Check python-path
187+
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
188+
shell: bash
189+
190+
- name: Validate version
191+
run: |
192+
$pythonVersion = (python --version)
193+
if ("Python ${{ matrix.python }}".replace("==", "") -ne "$pythonVersion"){
194+
Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python }}"
195+
exit 1
196+
}
197+
$pythonVersion
198+
shell: pwsh
199+
200+
- name: Run simple code
201+
run: python -c 'import math; print(math.factorial(5))'
202+
203+
setup-versions-from-poetry-pyproject-file:
204+
name: Setup ${{ matrix.python }} ${{ matrix.os }} poetry pyproject file
205+
runs-on: ${{ matrix.os }}
206+
strategy:
207+
fail-fast: false
208+
matrix:
209+
os: [macos-latest, windows-latest, ubuntu-20.04, ubuntu-22.04]
210+
python: [3.5.4, 3.6.7, 3.7.5, 3.8.15, 3.9.13]
211+
exclude:
212+
- os: ubuntu-22.04
213+
python: 3.5.4
214+
- os: ubuntu-22.04
215+
python: 3.6.7
216+
- os: ubuntu-22.04
217+
python: 3.7.5
218+
- os: windows-latest
219+
python: 3.8.15
220+
steps:
221+
- name: Checkout
222+
uses: actions/checkout@v3
223+
224+
- name: build-version-file ${{ matrix.python }}
225+
run: |
226+
echo '[tool.poetry.dependencies]
227+
python = "${{ matrix.python }}"
228+
' > pyproject.toml
229+
230+
- name: setup-python ${{ matrix.python }}
231+
id: setup-python
232+
uses: ./
233+
with:
234+
python-version-file: pyproject.toml
90235

91236
- name: Check python-path
92237
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'

.licenses/npm/@actions/http-client-2.0.1.dep.yml renamed to .licenses/npm/@actions/http-client-2.1.0.dep.yml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
0