Skip to content

Add telemetry

Add telemetry #1289

Workflow file for this run

name: Build
on:
push:
branches-ignore:
- 'upmerge/**'
paths-ignore:
- "*.md"
pull_request:
paths-ignore:
- "*.md"
workflow_dispatch: ~
schedule:
-
cron: "0 1 * * *" # Run at 1am every day
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
runs-on: ubuntu-latest
name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, State Machine ${{ matrix.state_machine_adapter }}, Refund ${{ matrix.refund }}"
strategy:
fail-fast: false
matrix:
php: ["8.3"]
symfony: ["^6.4", "^7.4"]
sylius: ["~2.0.8", "~2.1.0", "~2.2.0"]
node: ["22.x"]
database: ["mysql"]
database_version: ["8.4"]
state_machine_adapter: ["symfony_workflow"]
refund: ["false", "true"]
include:
-
php: "8.3"
symfony: "^7.4"
sylius: "~2.1.0"
node: "24.x"
database: "mysql"
database_version: "8.4"
state_machine_adapter: "winzou_state_machine"
refund: "false"
env:
APP_ENV: test
DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.database_version }}"
TEST_SYLIUS_STATE_MACHINE_ADAPTER: "${{ matrix.state_machine_adapter }}"
steps:
-
uses: actions/checkout@v4
-
name: Install Refund Plugin
if: matrix.refund == 'true'
run: composer require "sylius/refund-plugin" --no-update --no-scripts --no-interaction
-
name: Require Winzou State Machine
if: "${{ matrix.state_machine_adapter == 'winzou_state_machine' }}"
run: |
composer require winzou/state-machine:^0.4 --no-update
composer require winzou/state-machine-bundle:^0.6 --no-update
-
name: Build Sylius Test Application
uses: SyliusLabs/BuildTestAppAction@v3.2.0
with:
e2e_js: "yes"
cache_key: "${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}"
cache_restore_key: "${{ runner.os }}-php-${{ matrix.php }}-composer-"
database: "${{ matrix.database }}"
database_version: "${{ matrix.database_version }}"
node_version: "${{ matrix.node }}"
php_version: "${{ matrix.php }}"
sylius_version: "${{ matrix.sylius }}"
symfony_version: "${{ matrix.symfony }}"
-
name: Run security check
run: composer audit --abandoned=ignore
-
name: Validate composer.json
run: composer validate --ansi --strict
-
name: Run ECS
run: vendor/bin/ecs check
-
name: Lint container
run: vendor/bin/console lint:container
-
name: Run PHPStan
run: vendor/bin/phpstan analyse
-
name: Run PHPUnit (Unit)
run: vendor/bin/phpunit --colors=always --testsuite=unit
-
name: Run Mockoon CLI
uses: mockoon/cli-action@v2
with:
version: "latest"
data-file: tests/Integration/Refund/Functional/Mockoon.json
port: 8217
-
name: Run Functional Tests
if: matrix.refund == 'true'
run: vendor/bin/phpunit --colors=always --testsuite=integration-refund
-
name: Run Mockoon for Behat
shell: bash
run: |
npx mockoon-cli start --port=8218 --data tests/Behat/Mollie_Behat.json &
-
name: Run Behat
run: vendor/bin/behat --colors --strict -f progress -vvv --no-interaction || vendor/bin/behat --colors --strict -vvv --no-interaction --rerun
-
name: Upload Behat logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: "Behat logs - Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, Refund ${{ matrix.refund }}"
path: |
etc/build/
var/log
if-no-files-found: ignore
compression-level: 6
overwrite: true