forked from microsoft/playwright-python
-
Notifications
You must be signed in to change notification settings - Fork 0
120 lines (117 loc) · 3.47 KB
/
ci.yml
File metadata and controls
120 lines (117 loc) · 3.47 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
name: CI
on:
push:
branches:
- master
- release-*
pull_request:
branches:
- master
- release-*
jobs:
infra:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: microsoft/playwright-github-action@v1
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r local-requirements.txt
pip install -e .
- name: Build package
run: python setup.py bdist_wheel
- name: Install browsers
run: python -m playwright install
- name: Lint
run: pre-commit run --all-files
- name: Test Sync generation script
run: bash scripts/verify_api.sh
build:
name: Build
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.7, 3.8]
browser: [chromium, firefox, webkit]
include:
- os: ubuntu-latest
python-version: 3.9
browser: chromium
- os: windows-latest
python-version: 3.9
browser: chromium
- os: macos-latest
python-version: 3.9
browser: chromium
- os: macos-11.0
python-version: 3.9
browser: chromium
- os: macos-11.0
python-version: 3.9
browser: firefox
- os: macos-11.0
python-version: 3.9
browser: webkit
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: microsoft/playwright-github-action@v1
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r local-requirements.txt
pip install -e .
- name: Build package
run: python setup.py bdist_wheel
- name: Install browsers
run: python -m playwright install
- name: Common Tests
run: pytest -vv tests/common --browser=${{ matrix.browser }} --timeout 90
- name: Test Sync API
if: matrix.os != 'ubuntu-latest'
run: pytest -vv tests/sync --browser=${{ matrix.browser }} --timeout 90
- name: Test Sync API
if: matrix.os == 'ubuntu-latest'
run: xvfb-run pytest -vv tests/sync --browser=${{ matrix.browser }} --timeout 90
- name: Test Async API
if: matrix.os != 'ubuntu-latest'
run: pytest -vv tests/async --browser=${{ matrix.browser }} --timeout 90
- name: Test Async API
if: matrix.os == 'ubuntu-latest'
run: xvfb-run pytest -vv tests/async --browser=${{ matrix.browser }} --timeout 90
test-package-installations:
name: Test package installations
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: microsoft/playwright-github-action@v1
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r local-requirements.txt
pip install -e .
- name: Build package
run: python setup.py bdist_wheel
- name: Test package installation
run: bash buildbots/test-package-installations.sh