Skip to content

Merge pull request #3 from qcodr/fix/bidi-streaming-cancellation #22

Merge pull request #3 from qcodr/fix/bidi-streaming-cancellation

Merge pull request #3 from qcodr/fix/bidi-streaming-cancellation #22

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
name: "Unit tests (PHP ${{ matrix.php }})"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.2', '8.3', '8.4']
steps:
- uses: actions/checkout@v5
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, json
coverage: none
- name: Install dependencies
run: composer install --no-interaction --no-progress
- name: PHPUnit
run: vendor/bin/phpunit --testsuite unit
static:
name: Coding standard & static analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: mbstring, json
coverage: none
- name: Install dependencies
run: composer install --no-interaction --no-progress
- name: php-cs-fixer (dry-run)
run: vendor/bin/php-cs-fixer fix --dry-run --diff
env:
PHP_CS_FIXER_IGNORE_ENV: 1
- name: PHPStan
run: vendor/bin/phpstan analyse --no-progress
- name: Psalm taint analysis
run: vendor/bin/psalm --taint-analysis --no-progress
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: mbstring, json
coverage: pcov
- name: Install dependencies
run: composer install --no-interaction --no-progress
- name: PHPUnit with coverage
run: vendor/bin/phpunit --testsuite unit --coverage-clover coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
files: coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
mutation:
name: Mutation testing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: mbstring, json
coverage: pcov
- name: Install dependencies
run: composer install --no-interaction --no-progress
- name: Infection
run: vendor/bin/infection --threads=max --no-progress --logger-github
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }}
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }}