1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 04:38:27 +01:00

Merge pull request #4921 from Deltik/hotfix/tests/unit

Hotfix for tests failing after PHP 8.2 released
This commit is contained in:
Cameron 2022-12-11 10:18:23 -08:00 committed by GitHub
commit 0ae82a7d78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 54 deletions

View File

@ -1,53 +0,0 @@
name: Acceptance Tests
on:
push:
pull_request:
jobs:
test-acceptance:
runs-on: ubuntu-latest
container:
image: php:latest
services:
target:
image: ghcr.io/e107inc/e107/e107-dev:latest
ports:
- 22
- 80
- 3306
options: >-
--tmpfs /tmp
--tmpfs /run
--tmpfs /run/lock
--volume /sys/fs/cgroup:/sys/fs/cgroup:ro
steps:
- name: Install system dependencies
run: |
apt-get update
apt-get install -y git zip libzip-dev sshpass rsync
- name: Install necessary PHP extensions
run: docker-php-ext-install -j "$(nproc)" zip pdo_mysql mysqli
- uses: actions/checkout@v2
- name: Install Composer
run: curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer
- name: Install test dependencies
run: composer update --prefer-dist --no-progress
working-directory: ./e107_tests/
- name: Download Git submodule dependencies
run: git submodule update --init --recursive --remote
- name: Install the CI test configuration file
run: |
cp ./e107_tests/lib/ci/config.ci.yml ./e107_tests/config.yml
sed -i "s/host: 'db'/host: 'target'/" ./e107_tests/config.yml
- name: Run acceptance tests
run: php ./vendor/bin/codecept run acceptance --steps --debug
working-directory: ./e107_tests/

View File

@ -35,6 +35,8 @@ jobs:
- image: mariadb:10.3
- image: mariadb:10.4
- image: mariadb:10.5
- image: mariadb:10.6
- image: mariadb:10.10
runs-on: ubuntu-latest
container:
image: ${{ matrix.interpreter.image }}
@ -91,9 +93,12 @@ jobs:
- name: PECL install xdebug
run: |
if [ $(php -r 'printf(version_compare(PHP_VERSION, "7.2.0", ">=") ? 1 : 0);') = '1' ]
if [ $(php -r 'printf(version_compare(PHP_VERSION, "8.0.0", ">=") ? 1 : 0);') = '1' ]
then
pecl install xdebug
elif [ $(php -r 'printf(version_compare(PHP_VERSION, "7.2.0", ">=") ? 1 : 0);') = '1' ]
then
pecl install xdebug-3.1.6
elif [ $(php -r 'printf(version_compare(PHP_VERSION, "7.1.0", ">=") ? 1 : 0);') = '1' ]
then
pecl install xdebug-2.9.8