-
Notifications
You must be signed in to change notification settings - Fork 158
142 lines (119 loc) · 3.95 KB
/
Copy pathtests.yml
File metadata and controls
142 lines (119 loc) · 3.95 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
name: Tests
on: [push, pull_request, workflow_dispatch]
jobs:
tests:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ${{ matrix.os }}
timeout-minutes: 20
env:
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/ms-playwright
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
include:
- os: macos-14
python-version: "3.12"
- os: windows-2022
python-version: "3.12"
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Set up node
uses: actions/setup-node@v6
with:
node-version: 24
- name: Cache Playwright browsers
uses: actions/cache@v5
with:
path: ${{ github.workspace }}/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('tox.ini') }}
restore-keys: |
${{ runner.os }}-playwright-
- name: Install Playwright system dependencies
if: runner.os == 'Linux'
uses: nick-fields/retry@v4
with:
timeout_minutes: 5
max_attempts: 3
command: pip install playwright && playwright install-deps
- name: Install tox
run: pip install tox
- name: Run asyncio tests
run: tox -e py
- name: Run pinned dependency tests (Windows, asyncio tests)
if: runner.os == 'Windows'
run: tox -e py-pinned
- name: Run pinned dependency tests (Windows, Twisted tests)
if: runner.os == 'Windows'
run: tox -e py-pinned-twisted
- name: Upload coverage report (Linux)
if: runner.os == 'Linux'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov
- name: Upload coverage report (macOS)
if: runner.os == 'macOS'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
curl -Os https://uploader.codecov.io/latest/macos/codecov
chmod +x codecov
./codecov
- name: Upload coverage report (Windows)
if: runner.os == 'Windows'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe -Outfile codecov.exe
.\codecov.exe
tests-pinned:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-22.04
timeout-minutes: 20
env:
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/ms-playwright
steps:
- uses: actions/checkout@v6
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Set up node
uses: actions/setup-node@v6
with:
node-version: 24
- name: Cache Playwright browsers
uses: actions/cache@v5
with:
path: ${{ github.workspace }}/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('tox.ini') }}
restore-keys: |
${{ runner.os }}-playwright-
- name: Install Playwright system dependencies
uses: nick-fields/retry@v4
with:
timeout_minutes: 5
max_attempts: 3
command: pip install playwright && playwright install-deps
- name: Install tox
run: pip install tox
- name: Run asyncio tests with pinned versions
run: tox -e py-pinned
- name: Run twisted tests with pinned versions
run: tox -e py-pinned-twisted
- name: Upload coverage report
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov