Skip to content

Commit

Permalink
MDL-70900 ci: Move highest PHP to 8.0 (from current 7.4)
Browse files Browse the repository at this point in the history
Also adds xmlrpc-beta from PECL (PHP8 moved the extension there)
and setups max_input_vars=5000 as initial value (see MDL-71390).

Note that this also includes a tiny modification when configuring
redis sessions, because there was some outdated code from old issue,
now fixed (MDL-60978), so that info has been removed.
  • Loading branch information
stronk7 committed May 7, 2021
1 parent d42fd64 commit 52ef32e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- v[0-9]+.[0-9]+.[0-9]+*

env:
php: 7.4
php: 8.0

jobs:
Grunt:
Expand Down Expand Up @@ -55,10 +55,12 @@ jobs:
include:
- os: ubuntu-18.04
php: 7.3
extensions:
db: mysqli
- os: ubuntu-18.04
php: 7.4
php: 8.0
db: pgsql
extensions: xmlrpc-beta

steps:
- name: Setting up DB mysql
Expand Down Expand Up @@ -88,6 +90,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ matrix.extensions }}
ini-values: max_input_vars=5000
coverage: none

Expand Down
17 changes: 9 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,20 @@ jobs:
php: 7.3
env: DB=mysqli TASK=PHPUNIT

# Then, conditionally, all the highest php ones (7.4)
# Then, conditionally, all the highest php ones (8.0)
- if: env(MOODLE_PHP) = "all"
php: 7.4
php: 8.0
env: DB=none TASK=CITEST
- if: env(MOODLE_PHP) = "all"
php: 7.4
php: 8.0
env: DB=none TASK=GRUNT NVM_VERSION='lts/carbon'

- if: env(MOODLE_PHP) = "all" AND (env(MOODLE_DATABASE) = "pgsql" OR env(MOODLE_DATABASE) = "all" OR env(MOODLE_DATABASE) IS NOT present)
php: 7.4
php: 8.0
env: DB=pgsql TASK=PHPUNIT

- if: env(MOODLE_PHP) = "all" AND (env(MOODLE_DATABASE) = "mysqli" OR env(MOODLE_DATABASE) = "all")
php: 7.4
php: 8.0
env: DB=mysqli TASK=PHPUNIT

cache:
Expand Down Expand Up @@ -118,6 +118,8 @@ install:
fi
before_script:
- if [[ ${TRAVIS_PHP_VERSION:0:1} -gt 7 ]]; then pecl install xmlrpc-beta; fi
- echo 'max_input_vars=5000' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- phpenv config-rm xdebug.ini
- >
if [ "$TASK" = 'PHPUNIT' ];
Expand Down Expand Up @@ -187,10 +189,9 @@ before_script:
sed -i \
-e "/require_once/i \\define('TEST_CACHESTORE_REDIS_TESTSERVERS', '127.0.0.1');" \
config.php ;
# Redis session tests, but not for PHP 7.2 and up. See MDL-60978 for more info.
redissession="define('TEST_SESSION_REDIS_HOST', '127.0.0.1');"
# Redis session tests
sed -i \
-e "/require_once/i \\${redissession}" \
-e "/require_once/i \\define('TEST_SESSION_REDIS_HOST', '127.0.0.1');" \
config.php ;
# Initialise PHPUnit for Moodle.
Expand Down

0 comments on commit 52ef32e

Please sign in to comment.