-
Notifications
You must be signed in to change notification settings - Fork 1.6k
79 lines (64 loc) · 2.11 KB
/
browser_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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: E2E
on:
push:
pull_request:
permissions:
contents: read
jobs:
browser_tests:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
strategy:
fail-fast: false
matrix:
php: ["8.1", "8.3"]
name: Linux / PHP ${{ matrix.php }}
services:
mailhost:
image: docker.io/greenmail/standalone
ports:
- '3143:3143'
- '3025:3025'
browserhost:
image: docker.io/selenium/standalone-chromium
volumes:
- '/dev/shm:/dev/shm'
- ${{ github.workspace }}:/roundcubemail
ports:
- '4444:4444'
options: '--add-host=host.docker.internal:host-gateway'
env:
WEBDRIVER_CONNECT_URL: 'http://localhost:4444'
SERVER_URL: 'http://host.docker.internal:8000'
SERVER_BIND: '0.0.0.0:8000'
BROWSER_DOWNLOADS_DIR: '/roundcubemail/tests/Browser/downloads'
TESTRUNNER_DOWNLOADS_DIR: './tests/Browser/downloads'
RC_CONFIG_IMAP_HOST: 'tls://localhost:3143'
RC_CONFIG_SMTP_HOST: 'localhost:3025'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, fileinfo, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd, ldap, intl, pspell
tools: composer:v2
coverage: none
- name: Setup NPM
uses: actions/setup-node@v4
with:
node-version: '16'
- name: Setup problem matchers
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install Aspell
run: sudo apt-get -y install aspell aspell-en aspell-de
- name: Execute tests
run: .ci/run_browser_tests.sh
- name: Upload screenshots as artifacts
# Upload screenshot if the test suite failed.
if: failure()
uses: actions/upload-artifact@v4
with:
name: screenshots
path: tests/Browser/screenshots