forked from 10up/ElasticPress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
56 lines (50 loc) · 1.82 KB
/
.travis.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
language: php
php:
- 7.2
notifications:
email: false
services:
- mysql
cache:
directories:
- $HOME/.composer/cache/files
- $HOME/.npm
- node_modules
- $HOME/vendor
env:
global:
- WP_VERSION=latest ES_VERSION="7.5.0"
jobs:
fast_finish: true
include:
- stage: "ElasticPress Tests"
name: "Unit Tests"
script:
- composer run-script test
- composer run-script test-single-site
before_install:
- composer self-update --1
- composer --version
- curl -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$ES_VERSION-amd64.deb
- sudo dpkg -i --force-confnew elasticsearch-$ES_VERSION-amd64.deb
- sudo sed -i.old 's/-Xms1g/-Xms128m/' /etc/elasticsearch/jvm.options
- sudo sed -i.old 's/-Xmx1g/-Xmx128m/' /etc/elasticsearch/jvm.options
- echo -e '-XX:+DisableExplicitGC\n-Djdk.io.permissionsUseCanonicalPath=true\n-Dlog4j.skipJansi=true\n-server\n' | sudo tee -a /etc/elasticsearch/jvm.options
- sudo chown -R elasticsearch:elasticsearch /etc/default/elasticsearch
- sudo service elasticsearch restart
before_script:
- composer install
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
- sleep 10
- script: if [ -n "$AWS_ACCESS_KEY" ]; then bash run-wpacceptance.sh; fi
name: "WP Acceptance Test"
before_script:
- composer self-update --1
- composer install
- npm install
- if [ -n "$AWS_ACCESS_KEY" ]; then ./vendor/bin/wpsnapshots configure 10up --aws_key=$AWS_ACCESS_KEY --aws_secret=$SECRET_ACCESS_KEY --user_name=Travis [email protected]; fi
- script: composer run-script lint
name: "Linting"
before_script:
- composer self-update --1
- composer install