Skip to content

Commit

Permalink
Add package validate call to CI (#714)
Browse files Browse the repository at this point in the history
* Add package validate call

* Fix WF

* Touch composer.json to burst cache

* Fix job name

* Add PHP version to Psalm call

* Make package job depend on php job

* Fix base TestCase

* Add install directory

* Touch composer.json to burst cache

* Add install directory

* Fix install directory

* Temporarily remove job dependency

* Touch composer.json to bust cache

* Touch composer.json to bust cache

* Touch composer.json to bust cache

* Touch composer.json to bust cache

* Fix extensions

* Make package job depend on QA job

* Use PHP QA in CI badge
  • Loading branch information
tidal authored Jun 17, 2022
1 parent a22f9f1 commit 31bdeaa
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

name: PHP Composer
name: PHP QA

on:
push:
Expand All @@ -8,8 +7,7 @@ on:
branches: [ main ]

jobs:
build:

php:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
Expand Down Expand Up @@ -47,9 +45,6 @@ jobs:
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest

- name: Validate packages composer.json
run: vendor/bin/otel packages:composer:validate

- name: Check Style
run: vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --dry-run --stop-on-violation --using-cache=no -vvv

Expand All @@ -62,7 +57,7 @@ jobs:
run: vendor/bin/phan

- name: Run Psalm
run: vendor/bin/psalm --output-format=github
run: vendor/bin/psalm --output-format=github --php-version=${{ matrix.php-version }}

- name: Run Phpstan
run: vendor/bin/phpstan analyse --error-format=github
Expand All @@ -75,3 +70,10 @@ jobs:

- name: Code Coverage
run: bash <(curl -s https://codecov.io/bash) -F ${{ matrix.php-version }}

packages:
uses: opentelemetry-php/gh-workflows/.github/workflows/validate-packages.yml@main
needs: php
with:
matrix_extension: '["ast, json, grpc"]'
install_directory: '~/.test/.packages'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# OpenTelemetry php library

![CI Build](https://github.com/open-telemetry/opentelemetry-php/workflows/PHP%20Composer/badge.svg)
![CI Build](https://github.com/open-telemetry/opentelemetry-php/workflows/PHP%20QA/badge.svg)
[![codecov](https://codecov.io/gh/open-telemetry/opentelemetry-php/branch/master/graph/badge.svg)](https://codecov.io/gh/open-telemetry/opentelemetry-php)

## Current Project Status
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "open-telemetry/opentelemetry",
"description": "OpenTelemetry makes robust, portable telemetry a built-in feature of cloud-native software.",
"keywords": ["opentelemetry", "otel", "open-telemetry", "tracing", "logging", "metrics"],
"type": "library",
"homepage": "https://opentelemetry.io/docs/php",
"readme": "./README.md",
Expand Down Expand Up @@ -68,7 +69,7 @@
},
"require-dev": {
"ext-grpc": "*",
"assertwell/phpunit-global-state": "^0.2",
"assertwell/phpunit-global-state": "^0.2.1",
"composer/xdebug-handler": "^2.0",
"dg/bypass-finals": "^1.3",
"friendsofphp/php-cs-fixer": "^3.4",
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/SDK/Trace/SpanProcessor/MultiSpanProcessorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

namespace OpenTelemetry\Tests\Unit\SDK\Trace\SpanProcessor;

use Monolog\Test\TestCase;
use OpenTelemetry\SDK\Trace\ReadableSpanInterface;
use OpenTelemetry\SDK\Trace\ReadWriteSpanInterface;
use OpenTelemetry\SDK\Trace\SpanProcessor\MultiSpanProcessor;
use OpenTelemetry\SDK\Trace\SpanProcessorInterface;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;

/**
* @covers OpenTelemetry\SDK\Trace\SpanProcessor\MultiSpanProcessor
* @covers \OpenTelemetry\SDK\Trace\SpanProcessor\MultiSpanProcessor
*/
class MultiSpanProcessorTest extends TestCase
{
Expand Down

0 comments on commit 31bdeaa

Please sign in to comment.