forked from Vendic/magento2-vuestorefront-xmlsitemap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
50 lines (47 loc) · 1.84 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
env:
global:
- VENDIC_VENDOR_DIR=app/code/Vendic
- VENDIC_MODULE_NAME=VueStorefrontSitemap
- VENDIC_GITHUB_HTTPS_URL=https://github.com/Vendic/magento2-vuestorefront-xmlsitemap.git
matrix:
- MAGENTO_MAJOR_VERSION=2.3
- MAGENTO_MAJOR_VERSION=2.2
language: php
sudo: required
dist: trusty
php:
- 7.1
- 7.2
matrix:
exclude:
- php: 7.2
env: MAGENTO_MAJOR_VERSION=2.2
cache:
apt: true
directories: $HOME/.composer/cache
before_script:
# Init build and setup composer and mysql 5.6
- composer selfupdate
- echo '' > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
- sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ trusty multiverse" && sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ trusty-updates multiverse"
- sudo apt-get update -qq
- sudo apt-get remove -y -qq --purge mysql-common mysql-server-5.5 mysql-server-core-5.5 mysql-client-5.5 mysql-client-core-5.5
- sudo apt-get -y -qq autoremove;
- sudo apt-get -y -qq autoclean;
- sudo apt-get install -y -qq mysql-server-5.6 mysql-client-5.6;
- mysql -uroot -e 'SET @@global.sql_mode = NO_ENGINE_SUBSTITUTION; CREATE DATABASE magento_2_travis;';
# Setup test env
- git clone https://github.com/magento/magento2
- cp .travis/install-config-mysql.php magento2/dev/tests/integration/etc/install-config-mysql.php
- cd magento2
- composer install --prefer-dist
- git checkout $MAGENTO_MAJOR_VERSION
- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi;
# Install module and dependencies
- sudo mkdir -p $VENDIC_VENDOR_DIR
- sudo git clone $VENDIC_GITHUB_HTTPS_URL $VENDIC_VENDOR_DIR/$VENDIC_MODULE_NAME
- composer require evert/sitemap-php
- composer require --dev tddwizard/magento2-fixtures
script:
- cd dev/tests/integration
- ../../../vendor/bin/phpunit -c phpunit.xml.dist ../../../$VENDIC_VENDOR_DIR/$VENDIC_MODULE_NAME