FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
pythonnative/.github/workflows/ci.yml at main · pythonnative/pythonnative · GitHub
pythonnative
/
pythonnative
Public
Notifications
You must be signed in to change notification settings
Fork
23
Star
131
Code
Issues
11
Pull requests
4
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
pythonnative
/
.github
/
workflows
/
ci.yml
Copy path
View runs
More file actions
More file actions
Latest commit
History
History
History
135 lines (114 loc) · 4.23 KB
Breadcrumbs
pythonnative
/
.github
/
workflows
/
ci.yml
Copy path
File metadata and controls
135 lines (114 loc) · 4.23 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
name
:
CI
on
:
push
:
branches
:
[ '**' ]
pull_request
:
branches
:
[ '**' ]
jobs
:
build
:
runs-on
:
ubuntu-latest
strategy
:
matrix
:
python-version
:
['3.13', '3.14']
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v4
-
name
:
Set up uv (Python ${{ matrix.python-version }})
uses
:
astral-sh/setup-uv@v10.0.1
with
:
enable-cache
:
true
python-version
:
${{ matrix.python-version }}
-
name
:
Install dependencies
run
:
uv sync --locked --group dev
-
name
:
Lint (Ruff)
run
:
uv run ruff check .
-
name
:
Format check (Black)
run
:
uv run black --check src examples tests
-
name
:
Type check (MyPy)
run
:
uv run mypy
#
The Inbox and e2e apps each own a top-level ``app`` package, so
#
they're checked from their own directories rather than whole-tree.
-
name
:
Type check the Inbox example (strict)
working-directory
:
examples/inbox
env
:
MYPYPATH
:
../inbox-extension/src
run
:
uv run --project ../.. mypy --strict app
-
name
:
Type check the e2e suite (strict)
working-directory
:
examples/e2e-suite
run
:
uv run --project ../.. mypy --strict app
-
name
:
Rules of hooks (pn lint)
run
:
uv run pn lint src/pythonnative examples
#
Produces the sdist and wheel through the setuptools backend. Note
#
this builds but does not install them, so the previous non-editable
#
install smoke test is not replaced.
-
name
:
Build package
run
:
uv build
-
name
:
Run tests
run
:
uv run pytest -q
browser
:
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v4
-
uses
:
astral-sh/setup-uv@v10.0.1
with
:
python-version
:
'
3.13
'
-
run
:
uv sync --locked --group dev
-
run
:
uv run python scripts/run-browser-tests.py
#
The Swift half of the rendering core: decoders, component managers,
#
gestures, and module promises run under XCTest on a simulator.
native-ios
:
runs-on
:
macos-15
env
:
DEVELOPER_DIR
:
/Applications/Xcode_26.3.app/Contents/Developer
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v4
#
Runner images ship different simulator sets, and xcodebuild
#
silently falls back to "My Mac" (where UIKit doesn't exist) when
#
a named destination is missing, so resolve an available iPhone
#
simulator by UDID instead of hardcoding a model name.
-
name
:
Run PythonNativeKit tests
working-directory
:
src/pythonnative/native/ios
run
:
|
set -o pipefail
UDID="$(xcrun simctl list devices available -j | python3 -c '
import json, sys
data = json.load(sys.stdin)["devices"]
phones = [
d for runtime, devices in sorted(data.items()) if "iOS" in runtime
for d in devices if d.get("isAvailable") and d["name"].startswith("iPhone")
]
if not phones:
sys.exit("no available iPhone simulator on this runner")
print(phones[-1]["udid"])
')"
echo "Using simulator $UDID"
xcodebuild test \
-project Tests/NativeTests.xcodeproj \
-scheme NativeTests \
-parallel-testing-enabled NO \
-destination "platform=iOS Simulator,id=$UDID" \
-derivedDataPath "$RUNNER_TEMP/pnkit" \
-resultBundlePath "$RUNNER_TEMP/pnkit-results.xcresult"
-
name
:
Upload native test results
if
:
failure()
uses
:
actions/upload-artifact@v4
with
:
name
:
native-ios-results
path
:
${{ runner.temp }}/pnkit-results.xcresult
#
JUnit covers contracts; Robolectric exercises native widget lifecycles.
native-android
:
runs-on
:
ubuntu-latest
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v4
-
name
:
Set up Java 17
uses
:
actions/setup-java@v4
with
:
distribution
:
'
temurin
'
java-version
:
'
17
'
-
name
:
Set up Gradle
uses
:
gradle/actions/setup-gradle@v4
-
name
:
Run pythonnative module tests
working-directory
:
src/pythonnative/native/android
run
:
../../templates/android_template/gradlew testDebugUnitTest --no-daemon
Back
|
FazBrowse Home
|
New Git URL