FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
typeshed/.github/workflows/daily.yml at main · python/typeshed · GitHub
python
typeshed
Repository navigation
Code
Issues
208
(208)
Pull requests
191
(191)
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
typeshed
/
.github
/
workflows
/
daily.yml
Copy path
View runs
More file actions
More file actions
Latest commit
History
History
History
165 lines (153 loc) · 6.17 KB
Breadcrumbs
typeshed
/
.github
/
workflows
/
daily.yml
Copy path
File metadata and controls
165 lines (153 loc) · 6.17 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
name
:
Daily tests
on
:
workflow_dispatch
:
schedule
:
-
cron
:
"
0 0 * * *
"
pull_request
:
paths
:
-
"
requirements-tests.txt
"
-
"
.github/workflows/daily.yml
"
#
Please keep the permissions minimal, as stubtest runs arbitrary code from pypi.
permissions
:
contents
:
read
concurrency
:
group
:
${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress
:
true
env
:
#
A few env vars to speedup brew install
HOMEBREW_NO_ANALYTICS
:
1
HOMEBREW_NO_AUTOUPDATE
:
1
HOMEBREW_NO_INSTALL_CLEANUP
:
1
#
Environments are isolated, no need to cleanup old versions
NONINTERACTIVE
:
1
#
Required for brew install on CI
PIP_DISABLE_PIP_VERSION_CHECK
:
1
FORCE_COLOR
:
1
TERM
:
xterm-256color
#
needed for FORCE_COLOR to work on mypy on Ubuntu, see https://github.com/python/mypy/issues/13817
jobs
:
stubtest-stdlib
:
name
:
"
stubtest: stdlib
"
if
:
${{ github.repository == 'python/typeshed' || github.event_name != 'schedule' }}
runs-on
:
${{ matrix.os }}
strategy
:
matrix
:
os
:
["ubuntu-latest", "windows-latest", "macos-latest"]
python-version
:
["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
exclude
:
#
https://github.com/python/typeshed/issues/15694
-
os
:
"
windows-latest
"
python-version
:
"
3.10
"
fail-fast
:
false
steps
:
-
uses
:
actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
#
v7.0.1
with
:
persist-credentials
:
false
-
name
:
Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
uses
:
actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
#
v7.0.0
with
:
python-version
:
${{ matrix.python-version }}
cache
:
pip
cache-dependency-path
:
requirements-tests.txt
allow-prereleases
:
true
check-latest
:
true
-
name
:
Install dependencies
run
:
pip install -r requirements-tests.txt
-
name
:
Run stubtest
run
:
python tests/stubtest_stdlib.py
stubtest-third-party
:
name
:
"
stubtest: third party
"
if
:
${{ github.repository == 'python/typeshed' || github.event_name != 'schedule' }}
runs-on
:
${{ matrix.os }}
strategy
:
matrix
:
os
:
["ubuntu-latest", "windows-latest", "macos-latest"]
shard-index
:
[0, 1, 2, 3]
fail-fast
:
false
steps
:
-
uses
:
actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
#
v7.0.1
with
:
persist-credentials
:
false
-
uses
:
actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
#
v7.0.0
with
:
python-version
:
"
3.13
"
cache
:
pip
cache-dependency-path
:
|
requirements-tests.txt
stubs/**/METADATA.toml
-
name
:
Install dependencies
run
:
pip install -r requirements-tests.txt
-
name
:
Install required system packages
shell
:
bash
run
:
|
PACKAGES=$(python tests/get_stubtest_system_requirements.py)
# System package names contain no whitespace or glob characters, so word splitting is intentional.
# shellcheck disable=SC2086
if [ "${{ runner.os }}" = "Linux" ]; then
if [ -n "$PACKAGES" ]; then
printf 'Installing APT packages:\n'
printf ' %s\n' $PACKAGES
sudo apt-get update -q && sudo apt-get install -qy $PACKAGES
fi
else
if [ "${{ runner.os }}" = "macOS" ] && [ -n "$PACKAGES" ]; then
printf 'Installing Homebrew packages:\n'
printf ' %s\n' $PACKAGES
brew install -q $PACKAGES
fi
if [ "${{ runner.os }}" = "Windows" ] && [ -n "$PACKAGES" ]; then
printf 'Installing Chocolatey packages:\n'
printf ' %s\n' $PACKAGES
choco install -y $PACKAGES
fi
fi
-
name
:
Run stubtest
shell
:
bash
run
:
|
if [ "${{ runner.os }}" = "Linux" ]; then
PYTHON_EXECUTABLE="xvfb-run python"
else
PYTHON_EXECUTABLE="python"
fi
$PYTHON_EXECUTABLE tests/stubtest_third_party.py --ci-platforms-only --num-shards 4 --shard-index ${{ matrix.shard-index }}
stub-uploader
:
name
:
stub_uploader tests
if
:
${{ github.repository == 'python/typeshed' || github.event_name != 'schedule' }}
runs-on
:
ubuntu-latest
steps
:
-
name
:
Checkout typeshed
uses
:
actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
#
v7.0.1
with
:
path
:
typeshed
persist-credentials
:
false
-
name
:
Checkout stub_uploader
uses
:
actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
#
v7.0.1
with
:
repository
:
typeshed-internal/stub_uploader
path
:
stub_uploader
persist-credentials
:
false
-
uses
:
astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7
#
v10.2.0
with
:
version-file
:
"
typeshed/requirements-tests.txt
"
-
name
:
Run tests
run
:
|
cd stub_uploader
# Keep Python version in sync with stub_uploader's check_scripts.yml workflow.
uv run --python=3.13 --locked --group dev -m pytest tests
#
https://github.community/t/run-github-actions-job-only-if-previous-job-has-failed/174786/2
create-issue-on-failure
:
name
:
Create issue on failure
runs-on
:
ubuntu-latest
needs
:
[stubtest-stdlib, stubtest-third-party, stub-uploader]
if
:
${{ github.repository == 'python/typeshed' && always() && github.event_name == 'schedule' && (needs.stubtest-stdlib.result == 'failure' || needs.stubtest-third-party.result == 'failure' || needs.stub-uploader.result == 'failure') }}
permissions
:
issues
:
write
steps
:
-
uses
:
actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3
#
v9
with
:
github-token
:
${{ secrets.GITHUB_TOKEN }}
script
:
|
await github.rest.issues.create({
owner: "python",
repo: "typeshed",
title: `Daily tests failed on ${new Date().toDateString()}`,
body: "Run listed here: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
labels: ["help wanted"],
})
Back
|
FazBrowse Home
|
New Git URL