Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
GitPython/.github/workflows/pythonpackage.yml at 3.1.52 · gitpython-developers/GitPython · GitHub
Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
Uh oh!
There was an error while loading.
Please reload this page
.
gitpython-developers
/
GitPython
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
995
Star
5.2k
Code
Issues
8
Pull requests
2
Discussions
Actions
Security and quality
35
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Security and quality
Insights
Files
Expand file tree
3.1.52
Breadcrumbs
GitPython
/
.github
/
workflows
/
pythonpackage.yml
Copy path
View runs
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
185 lines (163 loc) · 6.17 KB
3.1.52
Breadcrumbs
GitPython
/
.github
/
workflows
/
pythonpackage.yml
Copy path
Top
File metadata and controls
Code
Blame
185 lines (163 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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
#
This workflow will install Python dependencies, run tests and lint with a variety of Python versions
#
For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name
:
Python package
on
:
push
:
branches
:
[main]
pull_request
:
workflow_dispatch
:
permissions
:
contents
:
read
jobs
:
test
:
strategy
:
matrix
:
os-type
:
[ubuntu, macos, windows]
python-version
:
["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.13t", "3.14", "3.14t"]
exclude
:
-
os-type
:
macos
python-version
:
"
3.7
"
#
Not available for the ARM-based macOS runners.
-
os-type
:
macos
python-version
:
"
3.13t
"
-
os-type
:
macos
python-version
:
"
3.14t
"
-
os-type
:
windows
python-version
:
"
3.13
"
#
FIXME: Fix and enable Python 3.13 and 3.14 on Windows (#1955).
-
os-type
:
windows
python-version
:
"
3.13t
"
-
os-type
:
windows
python-version
:
"
3.14
"
-
os-type
:
windows
python-version
:
"
3.14t
"
include
:
-
os-ver
:
latest
-
os-type
:
ubuntu
python-version
:
"
3.7
"
os-ver
:
"
22.04
"
-
build-docs
:
true
#
We ensure documentation builds, except on very old interpreters.
-
python-version
:
"
3.7
"
build-docs
:
false
-
python-version
:
"
3.8
"
build-docs
:
false
-
experimental
:
false
fail-fast
:
false
runs-on
:
${{ matrix.os-type }}-${{ matrix.os-ver }}
defaults
:
run
:
shell
:
bash --noprofile --norc -exo pipefail {0}
steps
:
-
uses
:
actions/checkout@v7
with
:
fetch-depth
:
0
-
name
:
Set up Python ${{ matrix.python-version }}
uses
:
actions/setup-python@v6
with
:
python-version
:
${{ matrix.python-version }}
allow-prereleases
:
${{ matrix.experimental }}
-
name
:
Set up WSL (Windows)
if
:
matrix.os-type == 'windows'
uses
:
Vampire/setup-wsl@v6.0.0
with
:
wsl-version
:
1
distribution
:
Debian
-
name
:
Prepare this repo for tests
run
:
|
./init-tests-after-clone.sh
-
name
:
Set git user identity and command aliases for the tests
run
:
|
git config --global user.email "travis@ci.com"
git config --global user.name "Travis Runner"
# If we rewrite the user's config by accident, we will mess it up
# and cause subsequent tests to fail
cat test/fixtures/.gitconfig >> ~/.gitconfig
-
name
:
Update PyPA packages
run
:
|
python -m pip install -U pip 'setuptools; python_version<"3.12"' wheel
-
name
:
Install project and test dependencies
run
:
|
pip install '.[test]'
-
name
:
Show POSIX file ownership
#
Linux and macOS only. On Windows, Git Bash's `ls -ld` reports a
#
uniform uid+gid for every path regardless of NTFS Owner (MSYS2's
#
SID-to-uid mapping doesn't have Cygwin's fidelity), so it would
#
not be informative here. The NTFS Owner check below covers Windows.
if
:
matrix.os-type != 'windows'
run
:
|
ls -ld -- \
"$(pwd)" \
"$(pwd)/.git" \
"$(pwd)/git/ext/gitdb" \
"$(pwd)/git/ext/gitdb/.git" \
"$(pwd)/git/ext/gitdb/gitdb/ext/smmap" \
"$(pwd)/git/ext/gitdb/gitdb/ext/smmap/.git" \
"${HOME:?HOME is not set}/.gitconfig" \
2>&1 ||
true
-
name
:
Show NTFS file ownership
#
Windows only. Reads NTFS Owner directly via Get-Acl, which is the
#
authoritative view for Windows-side ownership questions; the POSIX
#
view via Git Bash's MSYS2 layer is not a reliable proxy here.
if
:
matrix.os-type == 'windows'
shell
:
pwsh
run
:
|
$paths = @(
"$pwd",
"$pwd\.git",
"$pwd\git\ext\gitdb",
"$pwd\git\ext\gitdb\.git",
"$pwd\git\ext\gitdb\gitdb\ext\smmap",
"$pwd\git\ext\gitdb\gitdb\ext\smmap\.git",
"$env:USERPROFILE\.gitconfig"
)
foreach ($p in $paths) {
if (Test-Path -LiteralPath $p) {
try {
$owner = (Get-Acl -LiteralPath $p).Owner
} catch {
$owner = "ERROR: $($_.Exception.Message)"
}
"{0,-44} {1}" -f $owner, $p
} else {
"(missing: $p)"
}
}
-
name
:
Show safe.directory entries
#
`actions/checkout`'s safe.directory add is only durable for the
#
checkout itself (it writes under a throwaway HOME override and
#
then discards it), so by the time this step runs the runner
#
user's `~/.gitconfig` has no entries -- and git accepts the
#
workspace's ownership anyway: Git for Windows via its
#
Admins-group exemption on the windows matrix; on Linux/macOS
#
the workspace is owned by the test user. Expected: `(none)`.
run
:
git config --global --get-all safe.directory || echo "(none)"
-
name
:
Show version and platform information
run
:
|
uname -a
command -v git python
git version
python --version
python -c 'import os, sys; print(f"sys.platform={sys.platform!r}, os.name={os.name!r}")'
#
For debugging hook tests on native Windows systems that may have WSL.
-
name
:
Show bash.exe candidates (Windows)
if
:
matrix.os-type == 'windows'
run
:
|
set +e
bash.exe -c 'printenv WSL_DISTRO_NAME; uname -a'
python -c 'import subprocess; subprocess.run(["bash.exe", "-c", "printenv WSL_DISTRO_NAME; uname -a"])'
continue-on-error
:
true
-
name
:
Check types with mypy
if
:
matrix.python-version != '3.7' && matrix.python-version != '3.8'
run
:
|
mypy --python-version="${PYTHON_VERSION%t}" # Version only, with no "t" for free-threaded.
env
:
MYPY_FORCE_COLOR
:
"
1
"
TERM
:
"
xterm-256color
"
#
For color: https://github.com/python/mypy/issues/13817
PYTHON_VERSION
:
${{ matrix.python-version }}
-
name
:
Test with pytest
run
:
|
pytest --color=yes -p no:sugar --instafail -vv
continue-on-error
:
false
-
name
:
Documentation
if
:
matrix.build-docs
run
:
|
pip install '.[doc]'
make -C doc html
You can’t perform that action at this time.