Skip to content

- Update badges

- Update badges #205

Workflow file for this run

name: CI
on:
push:
branches:
tags:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.0', '8.1', '8.2']
include:
- operating-system: 'ubuntu-latest'
composer-flags: ' --prefer-stable'
php: '8.0'
- operating-system: 'ubuntu-latest'
php: '8.1'
composer-flags: ' --prefer-stable'
- operating-system: 'ubuntu-latest'
php: '8.2'
composer-flags: ' --prefer-stable'
services:
reindexer:
image: reindexer/reindexer
ports:
- 9088:9088
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer
coverage: xdebug
- name: Show php and composer version
run: php -v && composer -V
- name: debug if needed
run: if [[ "$DEBUG" == "true" ]]; then env; fi
env:
DEBUG: ${{secrets.DEBUG}}
- name: Install dependencies
run: composer install --prefer-dist --no-dev
- name: Install phpunit and php-cs-fixer with specific version
run: |
composer update phpunit/phpunit ${{ matrix.composer-flags }} --dev
composer update friendsofphp/php-cs-fixer ${{ matrix.composer-flags }} --dev
- name: Run unit and integration tests
run: |
vendor/bin/phpunit --bootstrap vendor/autoload.php --coverage-clover=coverage.xml
env:
REINDEXER_HOST: "http://0.0.0.0:9088"
- name: "Upload coverage file"
uses: "actions/upload-artifact@v2"
with:
name: "phpunit-${{ matrix.deps }}-${{ matrix.php-version }}.coverage"
path: "coverage.xml"
- name: Run style-fixer
run: vendor/bin/php-cs-fixer fix --config .php-cs-fixer.php --dry-run
- name: "Download coverage files"
uses: "actions/download-artifact@v2"
with:
path: "reports"
- uses: codecov/codecov-action@v2
with:
directory: "reports"
verbose: true # optional (default = false)