Update docker-compose file & setup running e2e tests on Travis CI
This commit is contained in:
parent
b1738068a4
commit
a7e582b1bb
14
.travis.yml
14
.travis.yml
|
@ -5,6 +5,8 @@ dist: xenial
|
||||||
services:
|
services:
|
||||||
- xvfb
|
- xvfb
|
||||||
- mysql
|
- mysql
|
||||||
|
- docker
|
||||||
|
- docker-compose
|
||||||
|
|
||||||
sudo: false
|
sudo: false
|
||||||
|
|
||||||
|
@ -32,14 +34,10 @@ matrix:
|
||||||
- name: "Coding standard check"
|
- name: "Coding standard check"
|
||||||
php: 7.2
|
php: 7.2
|
||||||
env: WP_VERSION=latest WP_MULTISITE=0 RUN_PHPCS=1
|
env: WP_VERSION=latest WP_MULTISITE=0 RUN_PHPCS=1
|
||||||
- name: "e2e tests"
|
- name: "E2E tests"
|
||||||
php: 7.2
|
env: RUN_E2E=1
|
||||||
env: WP_VERSION=latest WP_MULTISITE=0 RUN_E2E=1
|
script:
|
||||||
addons:
|
- docker-compose up -d
|
||||||
chrome: beta
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- nginx
|
|
||||||
- name: "Unit tests code coverage"
|
- name: "Unit tests code coverage"
|
||||||
php: 7.3
|
php: 7.3
|
||||||
env: WP_VERSION=latest WP_MULTISITE=0 RUN_CODE_COVERAGE=1
|
env: WP_VERSION=latest WP_MULTISITE=0 RUN_CODE_COVERAGE=1
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
version: '3.1'
|
version: '3.7'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: mysql:5.7
|
image: mariadb:10.4
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
environment:
|
environment:
|
||||||
MYSQL_DATABASE: testdb
|
MYSQL_DATABASE: testdb
|
||||||
MYSQL_USER: wordpress
|
MYSQL_USER: wordpress
|
||||||
MYSQL_PASSWORD: wordpress
|
MYSQL_PASSWORD: wordpress
|
||||||
MYSQL_RANDOM_ROOT_PASSWORD: '1'
|
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
|
||||||
volumes:
|
volumes:
|
||||||
- db:/var/lib/mysql
|
- db:/var/lib/mysql
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
if [[ ${RUN_E2E} == 1 ]]; then
|
if [[ ${RUN_E2E} == 1 ]]; then
|
||||||
|
npm run test:e2e
|
||||||
WP_SITE_URL="http://localhost:8080"
|
|
||||||
|
|
||||||
# Set base url to that of e2e test suite.
|
|
||||||
export BASE_URL="$WP_SITE_URL"
|
|
||||||
|
|
||||||
# Run the tests
|
|
||||||
npm test
|
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"url": "http://example.com",
|
"url": "http://example.com/",
|
||||||
"users": {
|
"users": {
|
||||||
"admin": {
|
"admin": {
|
||||||
"username": "",
|
"username": "",
|
||||||
|
|
|
@ -71,7 +71,7 @@ describe( 'Store owner can go through store Setup Wizard', () => {
|
||||||
await page.$eval( '#wc_tracker_submit', elem => elem.click() );
|
await page.$eval( '#wc_tracker_submit', elem => elem.click() );
|
||||||
|
|
||||||
// Wait for the Payment section to load
|
// Wait for the Payment section to load
|
||||||
await page.waitForNavigation();
|
await page.waitForNavigation( { waitUntil: 'networkidle0' } );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
it( 'Can fill out Payment details', async () => {
|
it( 'Can fill out Payment details', async () => {
|
||||||
|
|
Loading…
Reference in New Issue