Page MenuHomePhorge

No OneTemporary

Size
5 KB
Referenced Files
None
Subscribers
None
diff --git a/.github/workflows/config-test.inc.php b/.github/workflows/config-test.inc.php
new file mode 100644
index 000000000..2cba28441
--- /dev/null
+++ b/.github/workflows/config-test.inc.php
@@ -0,0 +1,30 @@
+<?php
+
+$config = array();
+
+// Database configuration
+$config['db_dsnw'] = 'sqlite:////tmp/sqlite.db?mode=0646';
+
+// Test user credentials
+$config['tests_username'] = 'test';
+$config['tests_password'] = 'test';
+
+// GreenMail
+$config['smtp_port'] = 25;
+
+// Settings required by the tests
+
+$config['create_default_folders'] = true;
+$config['skin'] = 'elastic';
+$config['support_url'] = 'http://support.url';
+
+// Plugins with tests
+
+$config['plugins'] = [
+ 'archive',
+ 'attachment_reminder',
+ 'markasjunk',
+ 'zipdownload'
+];
+
+$config['archive_mbox'] = 'Archive';
diff --git a/.github/workflows/setup.sh b/.github/workflows/setup.sh
new file mode 100755
index 000000000..7a66f87f7
--- /dev/null
+++ b/.github/workflows/setup.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+# The script is intended for use on Travis with Trusty distribution
+# It installs in-browser tests dependencies and prepares Roundcube instance
+
+GMV=1.5.11
+CHROMEVERSION=$(google-chrome-stable --version | tr -cd [:digit:]. | cut -d . -f 1)
+GMARGS="-Dgreenmail.setup.all -Dgreenmail.users=test:test -Dgreenmail.startup.timeout=3000"
+
+# Make temp and logs writeable
+sudo chmod 777 temp logs
+
+# Install javascript dependencies
+bin/install-jsdeps.sh
+
+# Compile Elastic's styles
+lessc --clean-css="--s1 --advanced" skins/elastic/styles/styles.less > skins/elastic/styles/styles.min.css
+lessc --clean-css="--s1 --advanced" skins/elastic/styles/print.less > skins/elastic/styles/print.min.css
+lessc --clean-css="--s1 --advanced" skins/elastic/styles/embed.less > skins/elastic/styles/embed.min.css
+
+# Use minified javascript files
+bin/jsshrink.sh
+
+# Install proper WebDriver version for installed Chrome browser
+php tests/Browser/install.php $CHROMEVERSION
+
+# GreenMail server download, setup and start
+wget https://repo1.maven.org/maven2/com/icegreen/greenmail-standalone/$GMV/greenmail-standalone-$GMV.jar \
+ && (sudo java $GMARGS -jar greenmail-standalone-$GMV.jar &) \
+ && sleep 5
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index f4583f1f6..81bae910b 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -1,50 +1,108 @@
name: tests
on:
push:
pull_request:
jobs:
linux_tests:
runs-on: ubuntu-18.04
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
strategy:
fail-fast: true
matrix:
php: [5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0]
name: PHP ${{ matrix.php }}/Linux
steps:
- name: Checkout code
uses: actions/checkout@v2
- 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
tools: composer:v2
coverage: none
- name: Setup problem matchers
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Setup composer
run: |
cp composer.json-dist composer.json
composer require "kolab/net_ldap3:~1.1.1" --no-update
- name: Fix PHPUnit for PHP8
run: composer config platform.php 7.4
if: matrix.php >= 8
- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-progress
+ - name: Execute tests
+ run: vendor/bin/phpunit -c tests/phpunit.xml
+
+ browser_tests:
+ runs-on: ubuntu-18.04
+ if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
+
+ strategy:
+ fail-fast: true
+
+ name: Browser Tests
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: 8.0
+ extensions: dom, curl, fileinfo, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd, ldap, intl
+ tools: composer:v2
+ coverage: none
+
+ - name: Set up JDK 1.8
+ uses: actions/setup-java@v1
+ with:
+ java-version: 1.8
+
+ - name: Setup problem matchers
+ run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
+
+ - name: Setup composer
+ run: |
+ cp composer.json-dist composer.json
+ composer require "kolab/net_ldap3:~1.1.1" --no-update
+ composer require "laravel/dusk:~6.9.0" --no-update
+
+ - name: Fix PHPUnit for PHP8
+ run: composer config platform.php 7.4
+ if: matrix.php >= 8
+
+ - name: Install dependencies
+ run: composer install --prefer-dist --no-interaction --no-progress
+
- name: Roundcube configuration
- run: cp .ci/config-test.inc.php config/config-test.inc.php
+ run: cp .github/config-test.inc.php config/config-test.inc.php
+
+ - name: Setup NPM deps
+ - run: |
+ npm install --force -g less
+ npm install --force -g less-plugin-clean-css
+ npm install --force -g uglify-js
- name: Execute tests
- run: vendor/bin/phpunit -c tests/phpunit.xml
+ run: |
+ .github/setup.sh \
+ && echo "TESTS_MODE: DESKTOP" \
+ && TESTS_MODE=desktop vendor/bin/phpunit -c tests/Browser/phpunit.xml \
+ && echo "TESTS_MODE: PHONE" \
+ && TESTS_MODE=phone vendor/bin/phpunit -c tests/Browser/phpunit.xml \
+ && echo "TESTS_MODE: TABLET" \
+ && TESTS_MODE=tablet vendor/bin/phpunit -c tests/Browser/phpunit.xml

File Metadata

Mime Type
text/x-diff
Expires
Thu, Mar 19, 9:01 AM (20 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
458552
Default Alt Text
(5 KB)

Event Timeline