Fix issues detected by code quality tools. #184
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: QA | |
on: [push, pull_request] | |
jobs: | |
run-tests: | |
name: Tests with PHP ${{ matrix.php-version }} | |
runs-on: ubuntu-latest | |
env: | |
VUFIND_HOME: $GITHUB_WORKSPACE | |
VUFIND_LOCAL_DIR: $GITHUB_WORKSPACE/local | |
strategy: | |
matrix: | |
php-version: ['7.3', '7.4', '8.0', '8.1'] | |
include: | |
- php-version: 7.3 | |
phing_tasks: "qa" | |
- php-version: 7.4 | |
phing_tasks: "qa" | |
- php-version: 8.0 | |
phing_tasks: "qa" | |
- php-version: 8.1 | |
phing_tasks: "qa" | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
extensions: intl, xsl, mongodb | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: Cache composer dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Cache php-cs-fixer data | |
uses: actions/cache@v3 | |
with: | |
path: .php_cs_cache | |
key: "php-${{ matrix.php-version }}-php-cs-fixer-${{ github.sha }}" | |
restore-keys: "php-${{ matrix.php-version }}-php-cs-fixer-" | |
- name: Install composer dependencies | |
run: composer install | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '19' | |
cache: 'npm' | |
- name: Install NPM dependencies | |
run: npm install | |
- name: Create config.php | |
run: cp config.php.sample config.php | |
- name: Run tests | |
run: vendor/bin/phing ${{ matrix.phing_tasks }} |