forked from SeleniumHQ/selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
156 lines (147 loc) · 4.18 KB
/
ci-python.yml
File metadata and controls
156 lines (147 loc) · 4.18 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
147
148
149
150
151
152
153
154
155
156
name: CI - Python
on:
workflow_call:
workflow_dispatch:
jobs:
build:
name: Build
uses: ./.github/workflows/bazel.yml
with:
name: Build
cache-key: py-build
run: |
bazel build //py:selenium-wheel //py:selenium-sdist
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout source tree
uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Generate docs
run: |
tox -c py/tox.ini
env:
TOXENV: docs
typing:
name: Type Checker
runs-on: ubuntu-latest
steps:
- name: Checkout source tree
uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Run type checking
run: |
tox -c py/tox.ini || true
env:
TOXENV: mypy
unit-tests:
name: Unit Tests
needs: build
uses: ./.github/workflows/bazel.yml
strategy:
fail-fast: false
matrix:
include:
- python-version: '3.10'
os: ubuntu
- python-version: '3.10'
os: macos
- python-version: '3.14'
os: ubuntu
- python-version: '3.14'
os: macos
with:
name: Unit Tests (${{ matrix.python-version }}, ${{ matrix.os }})
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
cache-key: python-unit-test-${{ matrix.python-version }}
run: |
bazel test //py:unit
remote-tests:
name: Remote Tests
needs: build
uses: ./.github/workflows/bazel.yml
strategy:
fail-fast: false
matrix:
include:
- browser: chrome
with:
name: Integration Tests (remote, ${{ matrix.browser }})
browser: ${{ matrix.browser }}
cache-key: py-remote-${{ matrix.browser }}
run: |
bazel test --local_test_jobs 1 --flaky_test_attempts 3 //py:test-remote
browser-tests:
name: Browser Tests
needs: build
uses: ./.github/workflows/bazel.yml
strategy:
fail-fast: false
matrix:
include:
- browser: chrome
os: ubuntu
- browser: edge
os: ubuntu
- browser: firefox
os: ubuntu
with:
name: Integration Tests (${{ matrix.browser }}, ${{ matrix.os }})
browser: ${{ matrix.browser }}
os: ${{ matrix.os }}
cache-key: py-browser-${{ matrix.browser }}
run: |
bazel test --local_test_jobs 1 --flaky_test_attempts 3 --pin_browsers=true //py:common-${{ matrix.browser }}-bidi //py:test-${{ matrix.browser }}
browser-tests-windows:
name: Browser Tests
needs: build
uses: ./.github/workflows/bazel.yml
strategy:
fail-fast: false
matrix:
include:
- browser: chrome
os: windows
- browser: edge
os: windows
with:
name: Integration Tests (${{ matrix.browser }}, ${{ matrix.os }})
browser: ${{ matrix.browser }}
os: ${{ matrix.os }}
cache-key: py-browser-${{ matrix.browser }}
run: |
fsutil 8dot3name set 0
bazel test --local_test_jobs 1 --flaky_test_attempts 3 --pin_browsers=true //py:common-${{ matrix.browser }}-bidi //py:test-${{ matrix.browser }}
browser-tests-macos:
name: Browser Tests
needs: build
uses: ./.github/workflows/bazel.yml
strategy:
fail-fast: false
matrix:
include:
- browser: safari
os: macos
with:
name: Integration Tests (${{ matrix.browser }}, ${{ matrix.os }})
browser: ${{ matrix.browser }}
os: ${{ matrix.os }}
cache-key: py-browser-${{ matrix.browser }}
run: |
bazel test --local_test_jobs 1 --flaky_test_attempts 3 --pin_browsers=true //py:common-${{ matrix.browser }} //py:test-${{ matrix.browser }}