-
-
Notifications
You must be signed in to change notification settings - Fork 498
117 lines (100 loc) · 3.23 KB
/
Copy pathpython-nightly.yml
File metadata and controls
117 lines (100 loc) · 3.23 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
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://github.com/coveragepy/coveragepy/blob/main/NOTICE.txt
name: "Python Nightly Tests"
on:
push:
branches:
- "**/*nightly*"
schedule:
# Run at 2:22am early every morning Eastern time (6/7:22 UTC)
# so that we get tips of CPython development tested.
# https://crontab.guru/#22_7_%2a_%2a_%2a
- cron: "22 7 * * *"
workflow_dispatch:
defaults:
run:
shell: bash
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
COVERAGE_IGOR_VERBOSE: 2
HYPOTHESIS_PROFILE: ci
permissions:
contents: read
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
tests:
name: "${{ matrix.python-version }}"
runs-on: "${{ matrix.os }}"
# If it doesn't finish in an hour, it's not going to. Don't spin for six
# hours needlessly.
timeout-minutes: 60
env:
TOX_GH_MAJOR_MINOR: "${{ matrix.python-version }}"
strategy:
matrix:
os:
- "ubuntu-latest"
python-version:
# When changing this list, be sure to check the [gh] list in
# tox.ini so that tox will run properly. PYVERSIONS
- "3.13"
- "3.14"
- "3.14t"
- "3.15"
- "3.15t"
- "3.16"
- "3.16t"
fail-fast: false
steps:
- name: "Check out the repo"
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: "Install system dependencies"
run: |
sudo sed -i.bak 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources
sudo apt-get update
sudo apt-get build-dep -y python3
- name: "Install pyenv"
run: |
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
- name: "Build Python ${{ matrix.python-version }}-dev"
env:
PYVER: "${{ matrix.python-version }}-dev"
run: |
set -xe
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> "$GITHUB_PATH"
pyenv install "$PYVER" -v
pyenv global "$PYVER"
- name: "Show diagnostic info"
run: |
set -xe
python -VV
python -m site
python -m sysconfig
python -c "import sys; print('GIL:', getattr(sys, '_is_gil_enabled', lambda: True)())"
python -m pip --version
python -m coverage debug sys
python -m coverage debug sqlite
python -m coverage debug pybehave
env | sort
- name: "Check the Python version"
env:
EXPECTED: "${{ matrix.python-version }}"
run: |
python -c "
import sys
print(f'{sys.version = }')
assert sys.version.startswith('$EXPECTED'.strip('t'))
assert getattr(sys, '_is_gil_enabled', lambda: True)() == (not '$EXPECTED'.endswith('t'))
"
- name: "Install dependencies"
run: |
python -m pip install -r requirements/tox.pip
- name: "Run tox"
run: |
python -m tox -v -- -rfsEX