Skip to content

chore(core): updated some deprecated code and removed unused code #3997

chore(core): updated some deprecated code and removed unused code

chore(core): updated some deprecated code and removed unused code #3997

Workflow file for this run

name: Run PHPUnit test suites
on: [pull_request, push]
env:
ELGG_DB_PREFIX: c_i_elgg_
ELGG_DB_HOST: 127.0.0.1
ELGG_DB_NAME: elgg
ELGG_DB_USER: root
ELGG_DB_PASS: password
ELGG_WWWROOT: http://localhost:8888/
ELGG_MEMCACHE_SERVER1_HOST: 127.0.0.1
ELGG_MEMCACHE_SERVER1_PORT: 11211
ELGG_MEMCACHE_NAMESPACE_PREFIX: elgg_
ELGG_REDIS_SERVER1_HOST: 127.0.0.1
ELGG_REDIS_SERVER1_PORT: 6379
jobs:
phpunit:
name: PHP ${{ matrix.php-versions }} - ${{ matrix.db-image }} ${{ matrix.extra-title }}
runs-on: ubuntu-20.04
continue-on-error: ${{ matrix.experimental }}
services:
elggdb:
image: ${{ matrix.db-image }}
env:
MYSQL_DATABASE: elgg
MYSQL_ROOT_PASSWORD: password
ports:
- 3306:3306
memcached:
image: memcached:1.6
ports:
- 11211:11211
redis:
image: redis:6
ports:
- 6379:6379
strategy:
fail-fast: false
matrix:
php-versions: ['8.1', '8.2', '8.3']
experimental: [false]
extra-title: ['']
memcache: [0]
db-image: ['mysql:8.0']
redis: [0]
include:
- php-versions: '8.1'
experimental: false
extra-title: '- Memcache'
memcache: 1
db-image: 'mysql:8.0'
redis: 0
- php-versions: '8.1'
experimental: false
extra-title: '- Redis'
memcache: 0
db-image: 'mysql:8.0'
redis: 1
- php-versions: '8.1'
experimental: false
extra-title: ''
memcache: 0
db-image: 'mysql:8.2'
redis: 0
- php-versions: '8.1'
experimental: false
extra-title: ''
memcache: 0
db-image: 'mariadb:10.6'
redis: 0
- php-versions: '8.1'
experimental: false
extra-title: ''
memcache: 0
db-image: 'mariadb:10.11'
redis: 0
env:
ELGG_MEMCACHE: ${{ matrix.memcache }}
ELGG_REDIS: ${{ matrix.redis }}
steps:
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none
extensions: gd,pdo,xml,json,memcached,redis-5.3.7,mysqli,pdo_mysql,libxml,mbstring,intl
ini-values: max_execution_time=180,zend.enable_gc=0
- name: Code checkout
uses: actions/checkout@v4
- name: Get Composer Cache Directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> ${GITHUB_OUTPUT}
- name: Restore Composer Cache
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Composer install
run: composer install
- name: Install Elgg
run: php ./elgg-cli install --config ./install/cli/testing_app.php --verbose --no-ansi
- name: Enable Elgg plugins
run: |
php ./elgg-cli plugins:activate activity blog bookmarks ckeditor dashboard developers discussions externalpages file friends friends_collections garbagecollector groups invitefriends likes members messageboard messages pages profile reportedcontent search site_notifications system_log tagcloud theme_sandbox thewire uservalidationbyemail web_services custom_index:last --no-ansi
php ./elgg-cli plugins:list --no-ansi
- name: Seed Elgg database
run: php ./elgg-cli database:seed --limit=5 --image_folder=./.scripts/seeder/images/ -vv --no-ansi --no-interaction
- name: Run PHPUnit - Core unit
run: ./vendor/bin/phpunit --testsuite unit
- name: Run PHPUnit - Core integration
run: ./vendor/bin/phpunit --testsuite integration
- name: Run PHPUnit - Plugins unit
run: ./vendor/bin/phpunit --testsuite plugins-unit
- name: Run PHPUnit - Plugins integration generic
run: ./vendor/bin/phpunit --testsuite plugins-integration-generic
- name: Run PHPUnit - Plugins integration
run: ./vendor/bin/phpunit --testsuite plugins-integration
- name: Unseed Elgg database
if: ${{ always() }}
run: php ./elgg-cli database:unseed -vv --no-ansi