Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/cs-fixer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CS-Fixer

on:
push:
branches:
- main
paths:
- '**.php'
- '.php-cs-fixer.dist.php'
pull_request:
workflow_dispatch:

jobs:
cs-fixer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
tools: composer:v2
coverage: none
extensions: gd, intl, mbstring, pdo_mysql, sodium, zip

- name: Install dependencies
run: composer update --no-ansi --no-interaction --no-progress

- name: Run PHP-CS-Fixer
run: vendor/bin/php-cs-fixer fix --dry-run --diff
32 changes: 32 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: PHPStan

on:
push:
branches:
- main
paths:
- '**.php'
- 'phpstan.neon.dist'
- 'composer.json'
pull_request:
workflow_dispatch:

jobs:
static-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
tools: composer:v2
coverage: none
extensions: gd, intl, mbstring, pdo_mysql, sodium, zip

- name: Install dependencies
run: composer update --no-ansi --no-interaction --no-progress

- name: Run PHPStan
run: vendor/bin/phpstan analyse --no-progress
46 changes: 46 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: PHPUnit

on:
push:
branches:
- main
paths:
- '**.php'
- 'phpunit.xml.dist'
- 'composer.json'
pull_request:
workflow_dispatch:

jobs:
unit:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
- '8.2'
- '8.3'
dependencies:
- lowest
- highest
steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer:v2
coverage: none
extensions: gd, intl, mbstring, pdo_mysql, sodium, zip

- name: Install lowest dependencies with composer
if: matrix.dependencies == 'lowest'
run: composer update --no-ansi --no-interaction --no-progress --prefer-lowest

- name: Install highest dependencies with composer
if: matrix.dependencies == 'highest'
run: composer update --no-ansi --no-interaction --no-progress

- name: Run PHPUnit
run: vendor/bin/phpunit
12 changes: 11 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,26 @@
"require": {
"php": ">=8.2",
"shopware/core": "~6.7.12 || ~6.8.0",
"promphp/prometheus_client_php": "^2.14"
"promphp/prometheus_client_php": "^2.15.1"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.95",
"opensearch-project/opensearch-php": "^2.6.0",
"phpstan/phpstan": "^2.2",
"phpunit/phpunit": "^11.5",
"predis/predis": "^2.3"
},
"suggest": {
"ext-redis": "Required when the metric storage uses a phpredis connection (via shopware.redis.connections or storage.dsn)",
"predis/predis": "Alternative supported Redis client for the metric storage"
},
"config": {
"allow-plugins": {
"php-http/discovery": false,
"symfony/runtime": false
},
"sort-packages": true
},
"extra": {
"shopware-platform-plugin": "Shopware\\PrometheusExporter\\PrometheusExporterBundle",
"label": {
Expand Down
Loading