PHP Composer #831
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: '34 3 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
php-versions: ['8.1', '8.2'] | |
name: PHP ${{ matrix.php-versions }} Test | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PHP ${{ matrix.php-versions }} | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
- name: Check PHP Version | |
run: php -v | |
- name: Install XeTeX | |
run: | | |
sudo apt-get update | |
sudo apt-get install texlive-xetex | |
- name: Install Pandoc 2.17 | |
run: | | |
wget https://github.com/jgm/pandoc/releases/download/2.17.1.1/pandoc-2.17.1.1-1-amd64.deb | |
sudo dpkg -i pandoc-2.17.1.1-1-amd64.deb | |
- name: Install Composer and Dependencies | |
run: curl -s http://getcomposer.org/installer | php && php composer.phar self-update && php composer.phar install | |
- name: Start MySQL | |
run: sudo systemctl start mysql.service | |
- name: Prepare workspace | |
run: ant prepare-workspace | |
- name: Prepare Database | |
run: bash vendor/bin/opus4db --adminpwd root --userpwd root --sqlpwd root | |
- name: Basic PHP file check | |
run: ant lint | |
- name: Install Fonts | |
run: | | |
sudo mkdir -p /usr/share/fonts/opentype | |
wget https://fonts.google.com/download?family=Open%20Sans -O Open_Sans.zip | |
unzip -o Open_Sans.zip -d Open_Sans | |
sudo cp -r Open_Sans/static/OpenSans/ /usr/share/fonts/opentype/ | |
fc-cache -f -v | |
- name: Tests | |
run: php composer.phar test | |
- name: Coding Style | |
run: php composer.phar cs-check |