From c9f6ac3c048708f329bf17427ac4bf27de338931 Mon Sep 17 00:00:00 2001 From: "Carlos Alexandre S. da Fonseca" Date: Tue, 21 Aug 2018 13:55:53 -0300 Subject: [PATCH] removing old travis patch --- .../patchs/0001-Update-travis-patch.patch | 244 ------------------ tests/other/patchs/0002-fix-travis.patch | 149 ----------- 2 files changed, 393 deletions(-) delete mode 100644 tests/other/patchs/0001-Update-travis-patch.patch delete mode 100644 tests/other/patchs/0002-fix-travis.patch diff --git a/tests/other/patchs/0001-Update-travis-patch.patch b/tests/other/patchs/0001-Update-travis-patch.patch deleted file mode 100644 index e2d3017..0000000 --- a/tests/other/patchs/0001-Update-travis-patch.patch +++ /dev/null @@ -1,244 +0,0 @@ -From 93880c8b9b9b4b25cb4519dece65bafdd6dca7a7 Mon Sep 17 00:00:00 2001 -From: "Carlos Alexandre S. da Fonseca" -Date: Sat, 4 Aug 2018 19:22:16 -0300 -Subject: [PATCH 1/2] Update travis patch - ---- - tests/other/patchs/travis-behat-patch.patch | 196 ++++++++++++---------------- - 1 file changed, 85 insertions(+), 111 deletions(-) - -diff --git a/tests/other/patchs/travis-behat-patch.patch b/tests/other/patchs/travis-behat-patch.patch -index 2145461..0ef159f 100644 ---- a/tests/other/patchs/travis-behat-patch.patch -+++ b/tests/other/patchs/travis-behat-patch.patch -@@ -1,142 +1,116 @@ - diff --git a/.travis.yml b/.travis.yml --index 54b7b79..310b64f 100644 -+index 222010f..2fde521 100644 - --- a/.travis.yml - +++ b/.travis.yml --@@ -7,7 +7,9 @@ sudo: required -+@@ -7,9 +7,8 @@ sudo: required - # We currently disable Travis notifications entirely until https://github.com/travis-ci/travis-ci/issues/4976 - # is fixed. - notifications: --- email: false --+ email: --+ on_success: change #never # default: change --+ on_failure: always # default: always -+- email: -+- on_success: change #never # default: change -+- on_failure: always # default: always -++ on_success: change #never # default: change -++ on_failure: always # default: always - - language: php - --@@ -17,6 +19,8 @@ php: -- - 7.0 -- -- addons: --+ hosts: --+ - smpl-cert.dev -+@@ -22,16 +21,12 @@ addons: -+ hosts: -+ - smpl-cert.dev - postgresql: "9.6" -- packages: -- - mysql-server-5.6 --@@ -26,6 +30,8 @@ addons: -+- packages: -+- - mysql-server-5.6 -+- - mysql-client-core-5.6 -+- - mysql-client-5.6 -++ services: -++ - docker -+ - # Redis tests are currently failing on php 7.2 due to https://bugs.php.net/bug.php?id=75628 - # services: - # - redis-server --+services: --+ - docker -+-services: -+- - docker - - env: - # Although we want to run these jobs and see failures as quickly as possible, we also want to get the slowest job to --@@ -43,6 +49,9 @@ env: -+@@ -41,20 +36,8 @@ env: -+ # CI Tests should be second-highest in priority as these only take <= 60 seconds to run under normal circumstances. -+ # Postgres is significantly is pretty reasonable in its run-time. - -+- # Run unit tests on MySQL -+- - DB=mysqli TASK=PHPUNIT -+- -+- # Run CI Tests without running PHPUnit. -+- - DB=none TASK=CITEST -+- -+- # Run unit tests on Postgres -+- - DB=pgsql TASK=PHPUNIT -+- - # Run unit tests on Postgres -- - DB=pgsql TASK=PHPUNIT --+ --+ # Run unit tests on Postgres --+ - DB=pgsql TASK=BEHAT MOODLE_VER=MOODLE_34 -- -- # Perform an upgrade test too. -- - DB=pgsql TASK=UPGRADE --@@ -69,6 +78,7 @@ cache: -- directories: -- - $HOME/.composer/cache -- - $HOME/.npm --+ - $HOME/.docker/cache -+- - DB=pgsql TASK=BEHAT MOODLE_VER=MOODLE_35_STABLE PLUGIN_VER=MOODLE_34 -+- -+- # Perform an upgrade test too. -+- - DB=pgsql TASK=UPGRADE -++ - DB=pgsql TASK=BEHAT PLUGIN_VER=MOODLE_35 - -- install: -- - > --@@ -111,6 +121,15 @@ install: -+ matrix: -+ # Enable fast finish. -+@@ -119,16 +102,15 @@ install: -+ # Typically it should be able to use the Composer cache if any other job has already completed before we started here. -+ travis_retry composer install --prefer-dist --no-interaction; - fi -- -+- - - > --+ if [ "$TASK" = 'BEHAT' ]; --+ then --+ if [ ! -e "$HOME/.docker/cache/image.tar" ]; then --+ docker pull selenium/standalone-firefox:2.53.1-beryllium; --+ docker save selenium/standalone-firefox:2.53.1-beryllium -o $HOME/.docker/cache/image.tar; --+ fi --+ docker load -i $HOME/.docker/cache/image.tar --+ fi --+ - > -- if [ "$TASK" = 'GRUNT' ]; -+ if [ "$TASK" = 'BEHAT' ]; - then -- nvm install $NVM_VERSION ; --@@ -120,9 +139,10 @@ install: -- before_script: -- - phpenv config-rm xdebug.ini -+- if [ ! -e "$HOME/.docker/cache/image.tar" ]; then -+- docker pull selenium/standalone-firefox:2.53.1-beryllium; -+- docker save selenium/standalone-firefox:2.53.1-beryllium -o $HOME/.docker/cache/image.tar; -+- fi -+- docker load -i $HOME/.docker/cache/image.tar -+- fi -++ if [ ! -e "$HOME/.docker/cache/image.tar" ]; then -++ docker pull selenium/standalone-firefox:2.53.1-beryllium; -++ docker save selenium/standalone-firefox:2.53.1-beryllium -o $HOME/.docker/cache/image.tar; -++ fi -++ docker load -i $HOME/.docker/cache/image.tar -++ fi - - > --- if [ "$TASK" = 'PHPUNIT' -o "$TASK" = 'UPGRADE' ]; --+ if [ "$TASK" = 'PHPUNIT' -o "$TASK" = 'UPGRADE' -o "$TASK" = 'BEHAT' ]; -- then -- # Copy generic configuration in place. --+ rm -rf config.php -- cp config-dist.php config.php ; -- -- # Create the moodledata directory. --@@ -183,6 +203,49 @@ before_script: -+ if [ "$TASK" = 'GRUNT' ]; -+ then -+@@ -203,7 +185,7 @@ before_script: - # Initialise PHPUnit for Moodle. - php admin/tool/phpunit/cli/init.php - fi --+ --+ - > --+ if [ "$TASK" = 'BEHAT' ]; --+ then --+ #Change php.ini to avoid error on php 5.6 --+ echo 'always_populate_raw_post_data="-1"' > /tmp/travis-php.ini --+ phpenv config-add /tmp/travis-php.ini --+ #Add simplecertificate --+ git clone -b $MOODLE_VER --single-branch https://github.com/bozoh/moodle-mod_simplecertificate.git mod/simplecertificate --+ --+ # Create a directory for the phpunit dataroot. --+ mkdir -p "$HOME"/roots/behat --+ --+ # The behat dataroot and prefix.. --+ sed -i \ --+ -e "/require_once/i \\\$CFG->behat_dataroot = '\/home\/travis\/roots\/behat';" \ --+ -e "/require_once/i \\\$CFG->behat_prefix = 'behat_';" \ --+ -e "/require_once/i \\\$CFG->behat_wwwroot='http://smpl-cert.dev:8000';"\ --+ -e "/require_once/i \\\$CFG->behat_debug = (E_ALL | E_STRICT);"\ --+ -e "/require_once/i \\\$CFG->behat_debugdisplay = 1;"\ --+ -e "/require_once/i \\\$CFG->behat_yuiloglevel = 'debug';"\ --+ -e "/require_once/i \\\$CFG->behat_langstringcache = false;"\ --+ -e "/require_once/i \\\$CFG->behat_noemailever = true;"\ --+ -e "/require_once/i \\\$CFG->behat_showcrondebugging = true;"\ --+ -e "/require_once/i \\\$CFG->behat_themedesignermode = true;"\ --+ -e "/require_once/i \\\$CFG->behat_cachejs = false;"\ --+ -e "/require_once/i \\\$CFG->behat_enablecompletion = true;"\ --+ -e "/require_once/i \\\$CFG->behat_enableavailability = true;"\ --+ -e "/require_once/i \\\$CFG->behat_moodlecourse_enablecompletion = true;"\ --+ config.php ; -+- - + --+ #Start php build in http server --+ cd $TRAVIS_BUILD_DIR --+ php -S smpl-cert.dev:8000 &> /dev/null & --+ # Initialise Behat for Moodle. --+ php admin/tool/behat/cli/init.php --+ curl -s http://smpl-cert.dev:8000 &> /dev/null --+ #Enable docker with mozilla. --+ docker run --net=host -d -p4444:4444 selenium/standalone-firefox:2.53.1-beryllium --+ sleep 5 --+ php admin/tool/behat/cli/util.php --enable --+ --+ fi -- - - > -- if [ "$TASK" = 'GRUNT' ]; --@@ -246,6 +309,12 @@ before_script: -+ if [ "$TASK" = 'BEHAT' ]; -+ then -+@@ -211,7 +193,7 @@ before_script: -+ echo 'always_populate_raw_post_data="-1"' > /tmp/travis-php.ini -+ phpenv config-add /tmp/travis-php.ini -+ #Add simplecertificate -+- git clone -b $PLUGIN_VER --single-branch https://github.com/bozoh/moodle-mod_simplecertificate.git mod/simplecertificate -++ git clone -b $MOODLE_VER --single-branch https://github.com/bozoh/moodle-mod_simplecertificate.git mod/simplecertificate -+ -+ # Create a directory for the phpunit dataroot. -+ mkdir -p "$HOME"/roots/behat -+@@ -270,7 +252,7 @@ before_script: -+ # We need the official upstream for comparison -+ git remote add upstream https://github.com/moodle/moodle.git; - -- script: -+- git fetch upstream MOODLE_34_STABLE; -++ git fetch upstream MOODLE_35_STABLE; -+ export GIT_PREVIOUS_COMMIT="`git merge-base FETCH_HEAD $TRAVIS_COMMIT`"; -+ export GIT_COMMIT="$TRAVIS_COMMIT"; -+ export UPSTREAM_FETCH_HEAD=`git rev-parse FETCH_HEAD` -+@@ -325,7 +307,7 @@ script: -+ then -+ bash local/ci/php_lint/php_lint.sh; -+ fi -+- -++ - - > --+ if [ "$TASK" = 'BEHAT' ]; --+ then --+ vendor/bin/behat --config /home/travis/roots/behat/behatrun/behat/behat.yml --tags @mod_simplecertificate --+ fi --+ --+ - > -- if [ "$TASK" = 'PHPUNIT' ]; -+ if [ "$TASK" = 'GRUNT' ]; - then -- vendor/bin/phpunit; --- -2.7.4 - diff --git a/tests/other/patchs/0002-fix-travis.patch b/tests/other/patchs/0002-fix-travis.patch deleted file mode 100644 index e73115b..0000000 --- a/tests/other/patchs/0002-fix-travis.patch +++ /dev/null @@ -1,149 +0,0 @@ -From 597006ded3d919ebed1904c90f69aa683647dcd4 Mon Sep 17 00:00:00 2001 -From: "Carlos Alexandre S. da Fonseca" -Date: Sat, 4 Aug 2018 19:40:02 -0300 -Subject: [PATCH 2/2] fix travis - ---- - tests/other/patchs/travis-behat-patch.patch | 123 ++++------------------------ - 1 file changed, 16 insertions(+), 107 deletions(-) - -diff --git a/tests/other/patchs/travis-behat-patch.patch b/tests/other/patchs/travis-behat-patch.patch -index 0ef159f..45e09fa 100644 ---- a/tests/other/patchs/travis-behat-patch.patch -+++ b/tests/other/patchs/travis-behat-patch.patch -@@ -1,116 +1,25 @@ -+From 7e7918c0738693dae743f2bd8fa55c386d1a4aa8 Mon Sep 17 00:00:00 2001 -+From: "Carlos Alexandre S. da Fonseca" -+Date: Sat, 4 Aug 2018 19:26:21 -0300 -+Subject: [PATCH] fix travis -+ -+--- -+ .travis.yml | 2 +- -+ 1 file changed, 1 insertion(+), 1 deletion(-) -+ - diff --git a/.travis.yml b/.travis.yml --index 222010f..2fde521 100644 -+index 2fde521..8c04de9 100644 - --- a/.travis.yml - +++ b/.travis.yml --@@ -7,9 +7,8 @@ sudo: required -- # We currently disable Travis notifications entirely until https://github.com/travis-ci/travis-ci/issues/4976 -- # is fixed. -- notifications: --- email: --- on_success: change #never # default: change --- on_failure: always # default: always --+ on_success: change #never # default: change --+ on_failure: always # default: always -- -- language: php -- --@@ -22,16 +21,12 @@ addons: -- hosts: -- - smpl-cert.dev -- postgresql: "9.6" --- packages: --- - mysql-server-5.6 --- - mysql-client-core-5.6 --- - mysql-client-5.6 --+ services: --+ - docker -- -- # Redis tests are currently failing on php 7.2 due to https://bugs.php.net/bug.php?id=75628 -- # services: -- # - redis-server ---services: --- - docker -- -- env: -- # Although we want to run these jobs and see failures as quickly as possible, we also want to get the slowest job to --@@ -41,20 +36,8 @@ env: -- # CI Tests should be second-highest in priority as these only take <= 60 seconds to run under normal circumstances. -- # Postgres is significantly is pretty reasonable in its run-time. -- --- # Run unit tests on MySQL --- - DB=mysqli TASK=PHPUNIT --- --- # Run CI Tests without running PHPUnit. --- - DB=none TASK=CITEST --- --- # Run unit tests on Postgres --- - DB=pgsql TASK=PHPUNIT --- -- # Run unit tests on Postgres --- - DB=pgsql TASK=BEHAT MOODLE_VER=MOODLE_35_STABLE PLUGIN_VER=MOODLE_34 --- --- # Perform an upgrade test too. --- - DB=pgsql TASK=UPGRADE --+ - DB=pgsql TASK=BEHAT PLUGIN_VER=MOODLE_35 -- -- matrix: -- # Enable fast finish. --@@ -119,16 +102,15 @@ install: -- # Typically it should be able to use the Composer cache if any other job has already completed before we started here. -- travis_retry composer install --prefer-dist --no-interaction; -- fi --- -- - > -- if [ "$TASK" = 'BEHAT' ]; -- then --- if [ ! -e "$HOME/.docker/cache/image.tar" ]; then --- docker pull selenium/standalone-firefox:2.53.1-beryllium; --- docker save selenium/standalone-firefox:2.53.1-beryllium -o $HOME/.docker/cache/image.tar; --- fi --- docker load -i $HOME/.docker/cache/image.tar --- fi --+ if [ ! -e "$HOME/.docker/cache/image.tar" ]; then --+ docker pull selenium/standalone-firefox:2.53.1-beryllium; --+ docker save selenium/standalone-firefox:2.53.1-beryllium -o $HOME/.docker/cache/image.tar; --+ fi --+ docker load -i $HOME/.docker/cache/image.tar --+ fi -- - > -- if [ "$TASK" = 'GRUNT' ]; -- then --@@ -203,7 +185,7 @@ before_script: -- # Initialise PHPUnit for Moodle. -- php admin/tool/phpunit/cli/init.php -- fi --- --+ -- - > -- if [ "$TASK" = 'BEHAT' ]; -- then --@@ -211,7 +193,7 @@ before_script: -+@@ -193,7 +193,7 @@ before_script: - echo 'always_populate_raw_post_data="-1"' > /tmp/travis-php.ini - phpenv config-add /tmp/travis-php.ini - #Add simplecertificate --- git clone -b $PLUGIN_VER --single-branch https://github.com/bozoh/moodle-mod_simplecertificate.git mod/simplecertificate --+ git clone -b $MOODLE_VER --single-branch https://github.com/bozoh/moodle-mod_simplecertificate.git mod/simplecertificate -+- git clone -b $MOODLE_VER --single-branch https://github.com/bozoh/moodle-mod_simplecertificate.git mod/simplecertificate -++ git clone -b $PLUGIN_VER --single-branch https://github.com/bozoh/moodle-mod_simplecertificate.git mod/simplecertificate - - # Create a directory for the phpunit dataroot. - mkdir -p "$HOME"/roots/behat --@@ -270,7 +252,7 @@ before_script: -- # We need the official upstream for comparison -- git remote add upstream https://github.com/moodle/moodle.git; -- --- git fetch upstream MOODLE_34_STABLE; --+ git fetch upstream MOODLE_35_STABLE; -- export GIT_PREVIOUS_COMMIT="`git merge-base FETCH_HEAD $TRAVIS_COMMIT`"; -- export GIT_COMMIT="$TRAVIS_COMMIT"; -- export UPSTREAM_FETCH_HEAD=`git rev-parse FETCH_HEAD` --@@ -325,7 +307,7 @@ script: -- then -- bash local/ci/php_lint/php_lint.sh; -- fi --- --+ -- - > -- if [ "$TASK" = 'GRUNT' ]; -- then -+-- -+2.7.4 -+ --- -2.7.4 -