Skip to content

Merge pull request #246 from daniel-sc/correct-handling-on-error-with… #144

Merge pull request #246 from daniel-sc/correct-handling-on-error-with…

Merge pull request #246 from daniel-sc/correct-handling-on-error-with… #144

Workflow file for this run

name: PHP Tests
on:
push:
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-20.04
env:
XDEBUG_MODE: coverage
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
matrix:
php: [ 7.3, 7.4, 8.0, 8.2 ]
steps:
- uses: actions/checkout@v3
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php }}-
- name: Install dependencies
uses: php-actions/composer@v6
with:
php_version: ${{ matrix.php }}
version: 2.x
- name: Run tests
uses: php-actions/composer@v6
with:
php_version: ${{ matrix.php }}
php_extensions: xdebug
version: 2.x
command: run-script test
- name: Create build directory necessary for coveralls # see https://github.com/php-coveralls/php-coveralls/issues/251
run: mkdir -p build/logs
shell: bash
- name: workaround for failing build
run: git config --global --add safe.directory /app
shell: bash
- name: Upload coverage
uses: php-actions/composer@v6
with:
php_version: ${{ matrix.php }}
version: 2.x
command: run-script upload-coverage