-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
146 lines (144 loc) Β· 4.88 KB
/
check.yaml
File metadata and controls
146 lines (144 loc) Β· 4.88 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
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
strategy:
fail-fast: false
matrix:
py:
- "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
os:
# - ubuntu-24.04
# - macos-15
- windows-2025
# include:
# - { 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@v4
- name: π₯ Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: π Setup Python for tox
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: π¦ Install tox with this virtualenv
shell: bash
run: |
if [[ "${{ matrix.py }}" == "3.13t" ]]; then
uv tool install --no-managed-python --python 3.13 tox --with .
else
uv tool install --no-managed-python --python 3.13 tox --with tox-uv --with .
fi
- name: π Setup Python for test ${{ matrix.py }}
uses: actions/setup-python@v5
if: ${{ !startsWith(matrix.py, 'brew@') }}
with:
python-version: ${{ matrix.py }}
- name: π οΈ Install OS dependencies
shell: bash
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
choco install nushell
fi
- name: 𧬠Pick environment to run
shell: bash
run: |
py="${{ matrix.py }}"
if [[ "$py" == brew@* ]]; then
brew_version="${py#brew@}"
echo "TOX_DISCOVER=/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: 20
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 }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-24.04
- windows-2025
tox_env:
- dev
- docs
- readme
- upgrade
- zipapp
exclude:
- { os: windows-2025, tox_env: readme }
- { os: windows-2025, tox_env: docs }
steps:
- name: π Install uv
uses: astral-sh/setup-uv@v4
- name: π¦ Install tox
run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv
- name: π₯ Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- 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 }}