From a20319cec67ee073c9655891d9cfe548cf15dd16 Mon Sep 17 00:00:00 2001 From: roboshyim Date: Tue, 21 Jul 2026 16:33:15 +0000 Subject: [PATCH] ci: add PHPUnit workflow (Shopware 6.7 + trunk matrix) Uses shopware/github-actions setup-extension + phpunit. Runs on PRs, pushes to main, manual dispatch, and nightly to catch upstream breaks. --- .github/workflows/php.yml | 52 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/php.yml diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml new file mode 100644 index 0000000..c503b03 --- /dev/null +++ b/.github/workflows/php.yml @@ -0,0 +1,52 @@ +name: PHP + +on: + pull_request: + paths: + - '**/*.php' + - composer.json + - phpunit.xml + - .github/workflows/php.yml + push: + branches: + - main + paths: + - '**/*.php' + - composer.json + - phpunit.xml + - .github/workflows/php.yml + workflow_dispatch: + schedule: + # nightly, to catch upstream Shopware changes that break the plugin + - cron: '17 3 * * *' + +jobs: + phpunit: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + shopware-version: + # Latest stable 6.7 minor and trunk (6.8 development), matching the + # composer constraint "~6.7.0 || ~6.8.0". Branch refs are resolved by + # the shopware-version action; there is no rolling "6.7.x" branch. + - '6.7.13.x' + - 'trunk' + steps: + - name: Setup Extension + uses: shopware/github-actions/setup-extension@main + with: + extensionName: ${{ github.event.repository.name }} + shopwareVersion: ${{ matrix.shopware-version }} + extraRepositories: |- + { + "local-plugins": { + "type": "path", + "url": "custom/plugins/*" + } + } + + - name: Run PHPUnit + uses: shopware/github-actions/phpunit@main + with: + extensionName: ${{ github.event.repository.name }}