Skip to content

GitHub actions

GitHub actions #7

Workflow file for this run

name: PHP
on:
pull_request:
paths:
- '**/*.php'
- .github/workflows/php.yml
push:
paths:
- '**/*.php'
branches:
- trunk
workflow_dispatch:
schedule:
- cron: '0 3 * * *'
jobs:
cs:
if: github.event_name != 'schedule'
uses: shopware/github-actions/.github/workflows/cs-fixer.yml@main
phpstan:
uses: shopware/github-actions/.github/workflows/phpstan.yml@main
with:
extensionName: SwagPayPal
shopwareVersion: trunk
phpunit:
runs-on: ubuntu-latest
steps:
- name: Setup Shopware
uses: FriendsOfShopware/setup-shopware@main
with:
shopware-version: trunk
php-version: 8.2
php-extensions: pcov
- name: Clone Extension
uses: actions/checkout@v4
with:
path: custom/plugins/SwagPayPal
- name: Dump autoload
uses: php-actions/composer@v6
with:
command: dump-autoload
working_dir: custom/plugins/SwagPayPal
- name: Run PHPUnit
working-directory: custom/plugins/SwagPayPal
run: ${{ github.workspace }}/vendor/bin/phpunit --coverage-clover clover.xml