-
Notifications
You must be signed in to change notification settings - Fork 2
110 lines (108 loc) · 3.53 KB
/
Copy pathpython_test.yml
File metadata and controls
110 lines (108 loc) · 3.53 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
name: CI - 🧪
on:
push:
branches:
- master
- 'releases/**'
jobs:
chrome-edge:
name: ${{ matrix.browser }} e2e test on ${{ matrix.os }}
strategy:
matrix:
os: [ macos-latest, windows-latest, ubuntu-latest ]
python-version: [ '3.10' ]
browser: [ 'chrome', 'edge' ]
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pwdriver codecov
- name: Install chrome
uses: nanasess/setup-chromedriver@v1.0.7
if: matrix.browser == 'chrome'
- name: Setup chromedriver
run: chromedriver --url-base=/wd/hub &
if: matrix.browser == 'chrome'
- name: Install edge
uses: browser-actions/setup-edge@latest
if: matrix.browser == 'edge' && runner.os != 'Linux'
- name: Start XVFB
run: Xvfb :99 &
if: runner.os != 'Windows'
- name: Make configuration file
run: |
echo [automation] > config.ini
echo local=true >> config.ini
echo url=http://localhost:4444 >> config.ini
echo target=${{ matrix.browser }} >> config.ini
- name: Test in ${{ matrix.browser }} with unittest
run: coverage run --omit="tests/*" -m unittest discover tests/ eventdriver.py
env:
DISPLAY: :99
- name: Upload coverage
uses: codecov/codecov-action@v3
safari:
name: safari e2e test on macos-latest
runs-on: macos-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pwdriver codecov
- name: Start XVFB
run: Xvfb :99 &
- name: Make configuration file
run: |
echo [automation] > config.ini
echo local=true >> config.ini
echo url=http://localhost:4444 >> config.ini
echo target=safari >> config.ini
- name: Test in safari with unittest
run: coverage run --omit="tests/*" -m unittest discover tests/ safari.py
env:
DISPLAY: :99
- name: Upload coverage
uses: codecov/codecov-action@v3
firefox:
name: firefox e2e test on ubuntu-latest
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pwdriver codecov
- name: Install firefox
uses: browser-actions/setup-firefox@latest
- name: Start XVFB
run: Xvfb :99 &
- name: Make configuration file
run: |
echo [automation] > config.ini
echo local=true >> config.ini
echo url=http://localhost:4444 >> config.ini
echo target=gecko >> config.ini
- name: Test in firefox with unittest
run: coverage run --omit="tests/*" -m unittest discover tests/ firefox.py
env:
DISPLAY: :99
- name: Upload coverage
uses: codecov/codecov-action@v3