1
- name : check
1
+ name : 🧪 check
2
2
on :
3
3
workflow_dispatch :
4
4
push :
5
5
branches : ["main"]
6
- tags-ignore : ["**"]
7
6
pull_request :
8
7
schedule :
9
8
- cron : " 0 8 * * *"
@@ -14,7 +13,7 @@ concurrency:
14
13
15
14
jobs :
16
15
test :
17
- name : test ${{ matrix.py }} - ${{ matrix.os }}
16
+ name : 🧪 test ${{ matrix.py }} - ${{ matrix.os }}
18
17
if : github.event_name != 'schedule' || github.repository_owner == 'pypa'
19
18
runs-on : ${{ matrix.os }}
20
19
timeout-minutes : 40
@@ -34,133 +33,106 @@ jobs:
34
33
- pypy-3.8
35
34
- graalpy-24.1
36
35
os :
37
- - ubuntu-latest
38
- - macos-latest
39
- - windows-latest
36
+ - ubuntu-24.04
37
+ - macos-15
38
+ - windows-2025
40
39
include :
41
- - { os: macos-latest , py: "brew@3.11" }
42
- - { os: macos-latest , py: "brew@3.10" }
43
- - { os: macos-latest , py: "brew@3.9" }
40
+ - { os: macos-15 , py: "brew@3.11" }
41
+ - { os: macos-15 , py: "brew@3.10" }
42
+ - { os: macos-15 , py: "brew@3.9" }
44
43
exclude :
45
- - { os: windows-latest , py: "graalpy-24.1" }
46
- - { os: windows-latest , py: "pypy-3.10" }
47
- - { os: windows-latest , py: "pypy-3.9" }
48
- - { os: windows-latest , py: "pypy-3.8" }
44
+ - { os: windows-2025 , py: "graalpy-24.1" }
45
+ - { os: windows-2025 , py: "pypy-3.10" }
46
+ - { os: windows-2025 , py: "pypy-3.9" }
47
+ - { os: windows-2025 , py: "pypy-3.8" }
49
48
steps :
50
- - uses : taiki-e/install-action@cargo-binstall
51
- - name : Install OS dependencies
52
- run : |
53
- set -x
54
- for i in 1 2 3; do
55
- echo "try $i" && \
56
- ${{ runner.os == 'Linux' && 'sudo apt-get update -y && sudo apt-get install snapd fish csh -y' || true }} && \
57
- ${{ runner.os == 'Linux' && 'cargo binstall -y nu' || true }} && \
58
- ${{ runner.os == 'macOS' && 'brew install fish tcsh nushell' || true }} && \
59
- ${{ runner.os == 'Windows' && 'choco install nushell' || true }} && \
60
- exit 0 || true;
61
- sleep 1
62
- done
63
- exit 1
64
- shell : bash
65
- - uses : actions/checkout@v4
66
- with :
67
- fetch-depth : 0
68
- - name : Install the latest version of uv
49
+ - name : 🚀 Install uv
69
50
uses : astral-sh/setup-uv@v4
51
+ - name : 📥 Checkout code
52
+ uses : actions/checkout@v4
70
53
with :
71
- enable-cache : true
72
- cache-dependency-glob : " pyproject.toml"
73
- github-token : ${{ secrets.GITHUB_TOKEN }}
74
- - name : Add .local/bin to PATH Windows
75
- if : runner.os == 'Windows'
76
- shell : bash
77
- run : echo "$USERPROFILE/.local/bin" >> $GITHUB_PATH
78
- - name : Add .local/bin to PATH macos-13
79
- if : matrix.os == 'macos-13'
80
- shell : bash
81
- run : echo ~/.local/bin >> $GITHUB_PATH
82
- - name : Install tox
83
- if : matrix.py == '3.13' || matrix.py == '3.13t'
84
- run : uv tool install --python-preference only-managed --python 3.12 tox --with tox-uv
85
- - name : Install tox
86
- if : " !(matrix.py == '3.13' || matrix.py == '3.13t')"
87
- run : uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv
88
- - name : Setup brew python for test ${{ matrix.py }}
89
- if : startsWith(matrix.py, 'brew@')
90
- run : |
91
- set -e
92
- PY=$(echo '${{ matrix.py }}' | cut -c 6-)
93
- brew cleanup && brew upgrade python@$PY || brew install python@$PY
94
- echo "/usr/local/opt/python@$PY/libexec/bin" >>"${GITHUB_PATH}"
95
- shell : bash
96
- - name : Setup python for test ${{ matrix.py }}
97
- if : " !(startsWith(matrix.py, 'brew@') || endsWith(matrix.py, 't'))"
54
+ fetch-depth : 0
55
+ - name : 🐍 Setup Python for tox
98
56
uses : actions/setup-python@v5
99
57
with :
100
- python-version : ${{ matrix.py }}
101
- allow-prereleases : true
102
- # quansight-labs to install free-threaded python until actions/setup-python supports it
103
- # https://github.com/actions/setup-python/issues/771
104
- - name : Setup python for test ${{ matrix.py }}
105
- if : endsWith(matrix.py, 't')
106
- uses : quansight-labs/setup-python@v5.3.1
58
+ python-version : " 3.13"
59
+ - name : 📦 Install tox with this virtualenv
60
+ run : uv tool install --no-managed-python --python 3.13 tox --with tox-uv --with .
61
+ - name : 🐍 Setup Python for test ${{ matrix.py }}
62
+ uses : actions/setup-python@v5
63
+ if : ${{ !startsWith(matrix.py, 'brew@') }}
107
64
with :
108
65
python-version : ${{ matrix.py }}
109
- - name : Pick environment to run
110
- if : matrix.py != '3.13t'
111
- run : python tasks/pick_tox_env.py ${{ matrix.py }}
112
- - name : Pick environment to run
113
- if : matrix.py == '3.13t' && runner.os != 'Windows'
114
- run : python tasks/pick_tox_env.py ${{ matrix.py }} $Python_ROOT_DIR/bin/python
115
- - name : Pick environment to run
116
- if : matrix.py == '3.13t' && runner.os == 'Windows'
117
- run : python tasks/pick_tox_env.py ${{ matrix.py }} $env:Python_ROOT_DIR\python.exe
118
- - name : Setup test suite
119
- run : tox run -vv --notest --skip-missing-interpreters false
120
- - name : Run test suite
66
+ - name : 🛠️ Install OS dependencies
67
+ shell : bash
68
+ run : |
69
+ if [ "${{ runner.os }}" = "Linux" ]; then
70
+ sudo apt-get install -y software-properties-common
71
+ sudo apt-add-repository ppa:fish-shell/release-4 -y
72
+ curl -fsSL https://apt.fury.io/nushell/gpg.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/fury-nushell.gpg
73
+ echo "deb https://apt.fury.io/nushell/ /" | sudo tee /etc/apt/sources.list.d/fury.list
74
+ sudo apt-get update -y
75
+ sudo apt-get install snapd fish csh nushell -y
76
+ elif [ "${{ runner.os }}" = "macOS" ]; then
77
+ if [[ "${{ matrix.py }}" == brew@* ]]; then
78
+ PY=$(echo '${{ matrix.py }}' | cut -c 6-)
79
+ brew install python@$PY || brew upgrade python@$PY
80
+ echo "/usr/local/opt/python@$PY/libexec/bin" >>"${GITHUB_PATH}"
81
+ fi
82
+ brew install fish tcsh nushell || brew upgrade fish tcsh nushell
83
+ elif [ "${{ runner.os }}" = "Windows" ]; then
84
+ choco install nushell
85
+ fi
86
+ - name : 🧬 Pick environment to run
87
+ shell : bash
88
+ run : |
89
+ py="${{ matrix.py }}"
90
+ if [[ "$py" == brew@* ]]; then
91
+ brew_version="${py#brew@}"
92
+ echo "TOX_DISCOVER=/opt/homebrew/bin/python${brew_version}" >> "$GITHUB_ENV"
93
+ py="$brew_version"
94
+ fi
95
+ [[ "$py" == graalpy-* ]] && py="graalpy"
96
+ echo "TOXENV=$py" >> "$GITHUB_ENV"
97
+ echo "Set TOXENV=$py"
98
+ - name : 🏗️ Setup test suite
99
+ run : tox run -vvvv --notest --skip-missing-interpreters false
100
+ - name : 🏃 Run test suite
121
101
run : tox run --skip-pkg-install
122
102
timeout-minutes : 20
123
103
env :
124
104
PYTEST_ADDOPTS : " -vv --durations=20"
125
105
CI_RUN : " yes"
126
106
DIFF_AGAINST : HEAD
127
-
128
107
check :
129
- name : ${{ matrix.tox_env }} - ${{ matrix.os }}
108
+ name : 🔎 check ${{ matrix.tox_env }} - ${{ matrix.os }}
130
109
if : github.event_name != 'schedule' || github.repository_owner == 'pypa'
131
110
runs-on : ${{ matrix.os }}
132
111
strategy :
133
112
fail-fast : false
134
113
matrix :
135
114
os :
136
- - ubuntu-latest
137
- - windows-latest
115
+ - ubuntu-24.04
116
+ - windows-2025
138
117
tox_env :
139
118
- dev
140
119
- docs
141
120
- readme
142
121
- upgrade
143
122
- zipapp
144
123
exclude :
145
- - { os: windows-latest , tox_env: readme }
146
- - { os: windows-latest , tox_env: docs }
124
+ - { os: windows-2025 , tox_env: readme }
125
+ - { os: windows-2025 , tox_env: docs }
147
126
steps :
148
- - uses : actions/checkout@v4
149
- with :
150
- fetch-depth : 0
151
- - name : Install the latest version of uv
127
+ - name : 🚀 Install uv
152
128
uses : astral-sh/setup-uv@v4
153
- with :
154
- enable-cache : true
155
- cache-dependency-glob : " pyproject.toml"
156
- github-token : ${{ secrets.GITHUB_TOKEN }}
157
- - name : Add .local/bin to Windows PATH
158
- if : runner.os == 'Windows'
159
- shell : bash
160
- run : echo "$USERPROFILE/.local/bin" >> $GITHUB_PATH
161
- - name : Install tox
129
+ - name : 📦 Install tox
162
130
run : uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv
163
- - name : Setup check suite
164
- run : tox r -vv --notest --skip-missing-interpreters false -e ${{ matrix.tox_env }}
165
- - name : Run check for ${{ matrix.tox_env }}
166
- run : tox r --skip-pkg-install -e ${{ matrix.tox_env }}
131
+ - name : 📥 Checkout code
132
+ uses : actions/checkout@v4
133
+ with :
134
+ fetch-depth : 0
135
+ - name : 🏗️ Setup check suite
136
+ run : tox run -vv --notest --skip-missing-interpreters false -e ${{ matrix.tox_env }}
137
+ - name : 🏃 Run check for ${{ matrix.tox_env }}
138
+ run : tox run --skip-pkg-install -e ${{ matrix.tox_env }}
0 commit comments