Skip to content

Fix badge and setup automatic Dependabot merges #66

Fix badge and setup automatic Dependabot merges

Fix badge and setup automatic Dependabot merges #66

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
jobs:
test:
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
name: PHP ${{ matrix.php-version }}
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['7.2', '7.3', '7.4', '8.0', '8.1']
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer:v2
coverage: pcov
- name: Setup Composer
id: setup-composer
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Setup cache
uses: actions/cache@v3
with:
path: ${{ steps.setup-composer.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock', '**/composer.json') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install dependencies
run: composer update -n --prefer-dist --no-progress
- name: Run tests
run: vendor/bin/phpunit
- name: Send code coverage
if: ${{ !startsWith(matrix.php-version, '7.2') && success() }}
continue-on-error: true
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: build/log/clover.xml