-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
196 lines (194 loc) Β· 7.2 KB
/
check.yaml
File metadata and controls
196 lines (194 loc) Β· 7.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
name: π§ͺ check
on:
workflow_dispatch:
push:
branches: ["main"]
pull_request:
schedule:
- cron: "0 8 * * *"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: π§ͺ test ${{ matrix.py }} - ${{ matrix.os }}
if: github.event_name != 'schedule' || github.repository_owner == 'pypa'
runs-on: ${{ matrix.os }}
timeout-minutes: 40
permissions:
contents: read
strategy:
fail-fast: false
matrix:
py:
- "3.14t"
- "3.14"
- "3.13t"
- "3.13"
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
- pypy-3.11
- pypy-3.10
- pypy-3.9
- pypy-3.8
- graalpy-24.1
- rp
os:
- ubuntu-24.04
- macos-15
- windows-2025
include:
- { os: macos-15, py: "brew@3.14" }
- { os: macos-15, py: "brew@3.13" }
- { os: macos-15, py: "brew@3.12" }
- { os: macos-15, py: "brew@3.11" }
- { os: macos-15, py: "brew@3.10" }
- { os: macos-15, py: "brew@3.9" }
exclude:
- { os: windows-2025, py: "graalpy-24.1" }
- { os: windows-2025, py: "pypy-3.10" }
- { os: windows-2025, py: "pypy-3.9" }
- { os: windows-2025, py: "pypy-3.8" }
steps:
- name: π Install uv
uses: astral-sh/setup-uv@v7
- name: π₯ Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: π·οΈ Fetch upstream tags for versioning
shell: bash
run: |
git fetch --force --tags https://github.com/pypa/virtualenv.git
- name: π Setup Python for tox
uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: π¦ Install tox with this virtualenv
shell: bash
run: |
if [[ "${{ matrix.py }}" == "3.13t" || "${{ matrix.py }}" == "3.14t" || "${{ matrix.py }}" == "rp" ]]; then
uv tool install --no-managed-python --python 3.14 "tox>=4.45" --with .
else
uv tool install --no-managed-python --python 3.14 "tox>=4.45" --with tox-uv --with .
fi
- name: π Setup Python for test ${{ matrix.py }}
uses: actions/setup-python@v6
if: ${{ !startsWith(matrix.py, 'brew@') && matrix.py != 'rp' }}
with:
python-version: ${{ matrix.py }}
- name: π¦ Setup RustPython
if: matrix.py == 'rp'
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: |
tag=$(gh release list --repo RustPython/RustPython --limit 1 --json tagName -q '.[0].tagName')
if [ "${{ runner.os }}" = "Linux" ]; then
asset="rustpython-release-Linux-x86_64-unknown-linux-gnu"
elif [ "${{ runner.os }}" = "macOS" ]; then
asset="rustpython-release-macOS-aarch64-apple-darwin"
elif [ "${{ runner.os }}" = "Windows" ]; then
asset="rustpython-release-Windows-x86_64-pc-windows-msvc.exe"
fi
gh release download "$tag" --repo RustPython/RustPython --pattern "$asset" --dir "$RUNNER_TEMP"
if [ "${{ runner.os }}" = "Windows" ]; then
cp "$RUNNER_TEMP/$asset" "/c/ProgramData/chocolatey/bin/rustpython.exe"
else
chmod +x "$RUNNER_TEMP/$asset"
sudo mv "$RUNNER_TEMP/$asset" /usr/local/bin/rustpython
fi
- name: π οΈ Install OS dependencies
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: |
if [ "${{ runner.os }}" = "Linux" ]; then
sudo apt-get install -y software-properties-common
sudo apt-add-repository ppa:fish-shell/release-4 -y
curl -fsSL https://apt.fury.io/nushell/gpg.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/fury-nushell.gpg
echo "deb https://apt.fury.io/nushell/ /" | sudo tee /etc/apt/sources.list.d/fury.list
sudo apt-get update -y
sudo apt-get install snapd fish csh nushell -y
elif [ "${{ runner.os }}" = "macOS" ]; then
brew update
if [[ "${{ matrix.py }}" == brew@* ]]; then
PY=$(echo '${{ matrix.py }}' | cut -c 6-)
brew install python@$PY || brew upgrade python@$PY
echo "/usr/local/opt/python@$PY/libexec/bin" >>"${GITHUB_PATH}"
fi
brew install fish tcsh nushell || brew upgrade fish tcsh nushell
elif [ "${{ runner.os }}" = "Windows" ]; then
nu_version=$(gh release view --repo nushell/nushell --json tagName -q .tagName)
gh release download "$nu_version" --repo nushell/nushell --pattern "*-x86_64-pc-windows-msvc.zip" --dir "$RUNNER_TEMP"
7z x "$RUNNER_TEMP/nu-${nu_version#v}-x86_64-pc-windows-msvc.zip" -o"$RUNNER_TEMP/nushell" -y
cp "$RUNNER_TEMP/nushell/nu.exe" "/c/ProgramData/chocolatey/bin/nu.exe"
fi
- name: 𧬠Pick environment to run
shell: bash
run: |
py="${{ matrix.py }}"
if [[ "$py" == brew@* ]]; then
brew_version="${py#brew@}"
echo "UV_PYTHON=/opt/homebrew/bin/python${brew_version}" >> "$GITHUB_ENV"
py="$brew_version"
fi
[[ "$py" == graalpy-* ]] && py="graalpy"
echo "TOXENV=$py" >> "$GITHUB_ENV"
echo "Set TOXENV=$py"
- name: ποΈ Setup test suite
run: tox run -vvvv --notest --skip-missing-interpreters false
- name: π Run test suite
run: tox run --skip-pkg-install
timeout-minutes: 30
env:
PYTEST_ADDOPTS: "-vv --durations=20"
CI_RUN: "yes"
DIFF_AGAINST: HEAD
check:
name: π check ${{ matrix.tox_env }} - ${{ matrix.os }}
if: github.event_name != 'schedule' || github.repository_owner == 'pypa'
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
fail-fast: false
matrix:
os:
- ubuntu-24.04
- windows-2025
tox_env:
- dev
- docs
- readme
- type
- type-3.8
- upgrade
- zipapp
exclude:
- { os: windows-2025, tox_env: docs }
- { os: windows-2025, tox_env: readme }
- { os: windows-2025, tox_env: type }
- { os: windows-2025, tox_env: type-3.8 }
steps:
- name: π Install uv
uses: astral-sh/setup-uv@v7
- name: π¦ Install tox
run: uv tool install --python-preference only-managed --python 3.14 "tox>=4.45" --with tox-uv
- name: π₯ Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: π·οΈ Fetch upstream tags for versioning
shell: bash
run: |
git fetch --force --tags https://github.com/pypa/virtualenv.git
- name: ποΈ Setup check suite
run: tox run -vv --notest --skip-missing-interpreters false -e ${{ matrix.tox_env }}
- name: π Run check for ${{ matrix.tox_env }}
run: tox run --skip-pkg-install -e ${{ matrix.tox_env }}
env:
UPGRADE_ADVISORY: ${{ matrix.tox_env == 'upgrade' && '1' || '' }}