Skip to content

chore(deps): update dependency psalm/plugin-mockery to v1 #532

chore(deps): update dependency psalm/plugin-mockery to v1

chore(deps): update dependency psalm/plugin-mockery to v1 #532

Workflow file for this run

name: PHP CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
php:
runs-on: ubuntu-latest
strategy:
matrix:
operating-system: [ubuntu-latest]
php-version: ['8.0', '8.1', '8.2']
project-dir:
- hooks/OpenTelemetry
- hooks/DDTrace
- hooks/Validators
- providers/Flagd
- providers/Split
- providers/GoFeatureFlag
# - providers/CloudBees
fail-fast: false
# todo exclude some matrix combinations based on php version requirements
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#excluding-matrix-configurations
steps:
- uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: xdebug
extensions: ast, grpc
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Validate composer.json and composer.lock
run: composer validate
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: ${{ matrix.project-dir }}/vendor
key: ${{ runner.os }}-${{ matrix.php-version }}-php-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-${{ matrix.php-version }}-php-
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
working-directory: ${{ matrix.project-dir }}
run: composer install --prefer-dist --no-progress --no-suggest
- name: Validate Packages composer.json
working-directory: ${{ matrix.project-dir }}
run: composer validate
- name: Check Style
working-directory: ${{ matrix.project-dir }}
run: vendor/bin/phpcs
- name: Run Phan
working-directory: ${{ matrix.project-dir }}
env:
PHAN_DISABLE_XDEBUG_WARN: 1
run: vendor/bin/phan
- name: Run Psalm
working-directory: ${{ matrix.project-dir }}
run: vendor/bin/psalm --output-format=github --php-version=${{ matrix.php-version }}
- name: Run Phpstan
working-directory: ${{ matrix.project-dir }}
run: vendor/bin/phpstan analyse --error-format=github
- name: Run PHPUnit (unit tests)
working-directory: ${{ matrix.project-dir }}
run: |
composer run dev:test:unit:setup
vendor/bin/phpunit --coverage-text --coverage-clover=coverage.unit.xml --testsuite unit
composer run dev:test:unit:teardown
- name: Run PHPUnit (integration tests)
working-directory: ${{ matrix.project-dir }}
run: |
composer run dev:test:integration:setup
vendor/bin/phpunit --coverage-text --coverage-clover=coverage.integration.xml --testsuite integration
composer run dev:test:integration:teardown
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
### TODO: Replicate any necessary package checks
# packages:
# uses: opentelemetry-php/gh-workflows/.github/workflows/validate-packages.yml@main
# needs: php
# with:
# matrix_extension: '["ast, json, grpc"]'
# install_directory: '~/.test/.packages'