diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 13cb51d..53597a1 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -12,15 +12,24 @@ on: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 + + strategy: + matrix: + php-versions: ['8.1'] + + name: PHP ${{ matrix.php-versions }} Test steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Setup PHP 7.1 + - name: Setup PHP ${{ matrix.php-versions }} uses: shivammathur/setup-php@v2 with: - php-version: '7.1' + php-version: ${{ matrix.php-versions }} + + - name: Check PHP Version + run: php -v - name: Install Composer and Dependencies run: sudo apt-get update && curl -s http://getcomposer.org/installer | php && php composer.phar self-update && php composer.phar install @@ -31,22 +40,20 @@ jobs: - name: Start MySQL run: sudo systemctl start mysql.service + - name: Prepare workspace + run: ant prepare-workspace + + - name: Prepare search config + run: ant prepare-config + - name: Prepare database - run: bash vendor/opus4-repo/framework/bin/prepare-database.sh --admin_pwd root --user_pwd root + run: bash vendor/bin/opus4db --adminpwd root --userpwd root --sqlpwd root - - name: Prepare - run: | - ant prepare-workspace prepare-config lint -DdbUserPassword=root -DdbAdminPassword=root - export APPLICATION_PATH=. && php vendor/opus4-repo/framework/db/createdb.php + - name: Basic PHP file check + run: ant lint - - name: Test + - name: Tests run: php composer.phar test - - name: Coding-Style + - name: Coding Style run: php composer.phar cs-check - - - name: PHP-LOC - run: php composer.phar phploc - - - name: PHP CPD - run: php composer.phar phpcpd diff --git a/.gitignore b/.gitignore index 295893b..c6e0ff2 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ build test/config.ini cache.properties +/database.ini # IDE files .idea @@ -16,3 +17,4 @@ vendor # Vagrant files .vagrant +.phpunit.result.cache diff --git a/Vagrantfile b/Vagrantfile index 7515858..02a13f5 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -2,10 +2,10 @@ # vi: set ft=ruby : $software = <