-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
100 lines (93 loc) · 2.63 KB
/
ci-python.yml
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
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
needs: build
runs-on: ubuntu-20.04
steps:
- name: Checkout source tree
uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox==4.6.4
- name: Test with tox
run: tox -c py/tox.ini
env:
TOXENV: docs
lint:
name: Lint
needs: build
runs-on: ubuntu-20.04
steps:
- name: Checkout source tree
uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox==4.6.4
- name: Test with tox
run: tox -c py/tox.ini
env:
# If this fails, it will exit. Local work should be using `tox -e linting` prior to committing.
# the linting-ci recipe exists solely for CI and will not attempt to rewrite any files in-place etc.
TOXENV: linting-ci
mypy:
name: Mypy
needs: build
runs-on: ubuntu-20.04
steps:
- name: Checkout source tree
uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox==4.6.4
- name: Test with tox
run: |
tox -c py/tox.ini -- --cobertura-xml-report ci || true
bash <(curl -s https://codecov.io/bash) -f py/ci/cobertura.xml
env:
TOXENV: mypy
remote-tests:
name: Remote Tests
needs: build
uses: ./.github/workflows/bazel.yml
with:
name: Integration Tests (remote)
browser: firefox
cache-key: py-remote
run: bazel test --local_test_jobs 1 --flaky_test_attempts 3 //py:test-remote
safari-tests:
name: Safari Tests
needs: build
uses: ./.github/workflows/bazel.yml
with:
name: Integration Tests (safari)
browser: safari
os: macos
cache-key: py-safari
run: |
bazel test --local_test_jobs 1 --flaky_test_attempts 3 //py:test-safari-test/selenium/webdriver/safari/launcher_tests.py