Skip to content

Commit

Permalink
Merge pull request #155 from fredden/mage-2.4-support
Browse files Browse the repository at this point in the history
Update tests for Magento 2.4 & PHP 7.4
  • Loading branch information
Ethan3600 committed Oct 11, 2020
2 parents 5c99d05 + 5b7f764 commit a374e3b
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 12 deletions.
33 changes: 24 additions & 9 deletions .travis.yml
@@ -1,32 +1,47 @@
sudo: required
dist: trusty
dist: bionic
group: edge
services:
- elasticsearch
- mysql
addons:
apt:
packages:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
- mysql-client
- postfix
hosts:
- magento2.travis
- magento2.travis
language: php
matrix:
include:
- php: 7.3
- php: 7.4
env:
- MAGENTO_VERSION=2.4-develop
- TEST_SUITE=coverage
- php: 7.3
- php: 7.4
env:
- MAGENTO_VERSION=2.4-develop
- TEST_SUITE=integration
- php: 7.3
- php: 7.4
env:
- MAGENTO_VERSION=2.4-develop
- TEST_SUITE=unit
- php: 7.4
env:
- MAGENTO_VERSION=2.4
- TEST_SUITE=integration
- php: 7.4
env:
- MAGENTO_VERSION=2.4
- TEST_SUITE=unit
- php: 7.3
env:
- MAGENTO_VERSION=2.4
- TEST_SUITE=integration
- php: 7.3
env:
- MAGENTO_VERSION=2.4
- TEST_SUITE=unit
- php: 7.3
env:
- MAGENTO_VERSION=2.3
Expand Down Expand Up @@ -69,6 +84,6 @@ cache:
- $HOME/.composer/cache
before_script: ./.travis/before_script.sh
script:
- if [[ $TEST_SUITE == 'coverage' ]]; then phpunit -c magento2/dev/tests/unit && phpunit -c magento2/dev/tests/integration ; else phpunit -c magento2/dev/tests/$TEST_SUITE ; fi
- if [[ $TEST_SUITE == 'coverage' ]]; then phpunit -c magento2/dev/tests/unit && phpunit -c magento2/dev/tests/integration ; else phpunit -c magento2/dev/tests/$TEST_SUITE ; fi
after_success:
- if [[ $TEST_SUITE == 'coverage' ]]; then travis_retry php $COMPOSER_BIN_DIR/php-coveralls -v ; fi
27 changes: 25 additions & 2 deletions .travis/before_script.sh
Expand Up @@ -51,8 +51,31 @@ case $TEST_SUITE in
SET @@global.sql_mode = NO_ENGINE_SUBSTITUTION;
CREATE DATABASE magento_integration_tests;
'
cp etc/install-config-mysql.travis.php.dist etc/install-config-mysql.php
sed -i '/amqp/d' etc/install-config-mysql.php

if test -f etc/install-config-mysql.travis.php.dist; then
cp etc/install-config-mysql.travis.php.dist etc/install-config-mysql.php
sed -i '/amqp/d' etc/install-config-mysql.php
else
cat -> etc/install-config-mysql.php <<"EOF"
<?php
return [
'db-host' => '127.0.0.1',
'db-user' => 'root',
'db-password' => '',
'db-name' => 'magento_integration_tests',
'db-prefix' => 'trv_',
'backend-frontname' => 'backend',
'search-engine' => 'elasticsearch7',
'elasticsearch-host' => 'localhost',
'elasticsearch-port' => 9200,
'admin-user' => \Magento\TestFramework\Bootstrap::ADMIN_NAME,
'admin-password' => \Magento\TestFramework\Bootstrap::ADMIN_PASSWORD,
'admin-email' => \Magento\TestFramework\Bootstrap::ADMIN_EMAIL,
'admin-firstname' => \Magento\TestFramework\Bootstrap::ADMIN_FIRSTNAME,
'admin-lastname' => \Magento\TestFramework\Bootstrap::ADMIN_LASTNAME,
];
EOF
fi

cd ../../..
;;
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -40,7 +40,7 @@ In your Magento2 root directory, you may install this package via composer:

CJM Ver. | Magento 2.0 | Magento 2.1 | Magento 2.2 | Magento 2.3 | Magento 2.4
--- | :---: | :---: | :---: | :---: | :---:
1.x | :x: | :x: | :white_check_mark: | :white_check_mark: | :question:
1.x | :x: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark:


## Features
Expand Down

0 comments on commit a374e3b

Please sign in to comment.