Skip to content

#1251 Moved PackageHandler to opus4-import #2955

#1251 Moved PackageHandler to opus4-import

#1251 Moved PackageHandler to opus4-import #2955

Workflow file for this run

name: PHP Composer
on:
push:
pull_request:
types: [ assigned, opened, synchronize, reopened ]
schedule:
- cron: '30 1 * * *'
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
versions: [{php: '8.1', solr: '9.6.1'}]
fail-fast: false
name: PHP ${{ matrix.versions.php }} Test
steps:
- uses: actions/checkout@v3
- name: Setup PHP ${{ matrix.versions.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.versions.php }}
- name: Install Composer and Dependencies
run: sudo apt-get update && curl -s https://getcomposer.org/installer | php && php composer.phar self-update && php composer.phar install
- name: Fix for issue 502
run: sudo apt-get --fix-broken install
- name: Install additional Software
run: sudo apt-get install libxml2-utils
- name: Get Solr ${{ matrix.versions.solr }} from Cache
id: cache-solr
uses: actions/cache@v3
with:
path: downloads
key: solr-${{ matrix.versions.solr }}
- name: Install Solr ${{ matrix.versions.solr }}
run: sudo bash tests/bin/install_solr_docker.sh --version ${{ matrix.versions.solr }}
- name: Start MySQL
run: sudo systemctl start mysql.service
- name: Prepare database
run: export MYSQL_PWD=root && mysql --default-character-set=utf8 -h 'localhost' -P '3306' -u 'root' -v -e "CREATE DATABASE IF NOT EXISTS opusdb DEFAULT CHARACTER SET = UTF8 DEFAULT COLLATE = UTF8_GENERAL_CI; CREATE USER 'opus4admin'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root'; GRANT ALL PRIVILEGES ON opusdb.* TO 'opus4admin'@'localhost'; CREATE USER 'opus4'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root'; GRANT SELECT,INSERT,UPDATE,DELETE ON opusdb.* TO 'opus4'@'localhost'; FLUSH PRIVILEGES;"
- name: Lint PHP files
run: ant lint
- name: Setup folders
run: ant prepare-workspace prepare-test-workspace
- name: Setup config
run: ant prepare-config lint -DdbUserPassword=root -DdbAdminPassword=root -DphpVersion=${{ matrix.versions.php }}
- name: Setup testdata
run: ant reset-testdata
- name: Mail-Server
run: php scripts/opus-smtp-dumpserver.php 2>&1 >> tests/workspace/log/opus-smtp-dumpserver.log &
- name: Test-library
run: php composer.phar test -- --testsuite library
- name: Test-modules
run: php composer.phar test -- --testsuite modules
- name: Test-admin
run: php composer.phar test -- --testsuite admin
- name: Test-security
run: php composer.phar test -- --testsuite security
- name: Test-scripts
run: php composer.phar test -- --testsuite scripts
- name: Coding-Style
run: php composer.phar cs-check