-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (49 loc) · 1.52 KB
/
selenium_tests.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
name: Selenium Selenoid Tests
on:
push:
branches:
- '**'
paths-ignore:
- 'docs/**'
- 'tests/static_tests/**'
- 'README.md'
- 'CHANGELOG.md'
- 'LICENSE'
- '.gitignore'
jobs:
selenium-selenoid:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
image: [ "selenoid/chrome:128.0", "selenoid/firefox:125.0"]
python-version: [ "3.8", "3.12" ]
services:
selenoid:
image: ${{ matrix.image }}
options: --privileged --memory=4g
ports:
- 4444:4444
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Environment
id: setup
uses: ./.github/actions/setup
with:
python-version: ${{ matrix.python-version }}
- name: Extract Browser Name
run: |
browser_name=$(echo "${{ matrix.image }}" | sed -E 's|.*/([^:]+):.*|\1|')
echo "BROWSER=${browser_name}" >> $GITHUB_ENV
- name: Run Selenium ${{ env.BROWSER }} tests with py${{ matrix.python-version }}
id: tests
run: |
uv run --no-config pytest tests/web_tests --platform selenium --driver ${{ env.BROWSER }} --env remote --headless -v --alluredir=allure-report --reruns=2
continue-on-error: true
- name: Teardown (Allure Report and Error Handling)
if: ${{ steps.tests.outcome == 'failure' }}
uses: ./.github/actions/teardown
with:
browser-name: ${{ env.BROWSER }}
engine: "selenium"