PHP Composer #1451
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.7.0'}, {php: '8.2', solr: '9.7.0'}] | |
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: 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 | |
- 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 bin/install_solr_docker.sh --version ${{ matrix.versions.solr }} | |
- 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/bin/opus4db --adminpwd root --userpwd root --sqlpwd root | |
- name: Basic PHP File Check | |
run: ant lint | |
- name: Tests | |
run: php composer.phar test | |
- name: Coding Style | |
run: php composer.phar cs-check |