chore: codestyle #516
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: | |
- 'main' | |
tags-ignore: | |
- '*' | |
pull_request: | |
workflow_call: | |
jobs: | |
Test: | |
env: | |
PLUGIN_NAME: FroshPlatformThumbnailProcessor | |
strategy: | |
fail-fast: false | |
matrix: | |
# don't forget to update the matrix for integration tests | |
version: [ "v6.6.4.0", "v6.6.3.1", "v6.6.2.0", "v6.6.1.1", "v6.6.0.3", "trunk" ] | |
php-version: [ "8.2", "8.3" ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Shopware | |
uses: shopware/setup-shopware@main | |
with: | |
shopware-version: ${{ matrix.version }} | |
php-version: ${{ matrix.php-version }} | |
php-extensions: pcov | |
- name: Info | |
run: | | |
php bin/console -V | |
mysql -V | |
php -v | |
composer -V | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
path: ${{ github.workspace }}/custom/plugins/${{ env.PLUGIN_NAME }} | |
- name: Run UnitTests | |
working-directory: ${{ github.workspace }}/custom/plugins/${{ env.PLUGIN_NAME }} | |
run: | | |
composer create-placeholders | |
php -d pcov.enabled=1 ${{ github.workspace }}/vendor/bin/phpunit --coverage-clover clover.xml --testsuite Unit | |
- uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
files: ./clover.xml | |
root_dir: ${{ github.workspace }}/custom/plugins/${{ env.PLUGIN_NAME }} | |
working-directory: ${{ github.workspace }}/custom/plugins/${{ env.PLUGIN_NAME }} | |
# we call this after PHPUnit to make sure that the generated files are available | |
- name: PHPStan | |
run: | | |
${{ github.workspace }}/vendor/bin/phpstan analyse -c ${{ github.workspace }}/custom/plugins/${{ env.PLUGIN_NAME }}/phpstan.neon | |
IntegrationTest: | |
env: | |
PLUGIN_NAME: FroshPlatformThumbnailProcessor | |
strategy: | |
fail-fast: false | |
matrix: | |
version: [ "v6.6.4.0", "v6.6.3.1", "v6.6.2.0", "v6.6.1.1", "v6.6.0.3", "trunk" ] | |
php-version: [ "8.2", "8.3" ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Shopware | |
uses: shopware/setup-shopware@main | |
with: | |
shopware-version: ${{ matrix.version }} | |
php-version: ${{ matrix.php-version }} | |
php-extensions: pcov | |
- name: Info | |
run: | | |
php bin/console -V | |
mysql -V | |
php -v | |
composer -V | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
path: ${{ github.workspace }}/custom/plugins/${{ env.PLUGIN_NAME }} | |
- name: PHPUnit Integration | |
working-directory: ${{ github.workspace }}/custom/plugins/${{ env.PLUGIN_NAME }} | |
run: | | |
composer create-placeholders | |
php -d pcov.enabled=1 ${{ github.workspace }}/vendor/bin/phpunit --testsuite Integration | |
- uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
files: ./clover.xml | |
root_dir: ${{ github.workspace }}/custom/plugins/${{ env.PLUGIN_NAME }} | |
working-directory: ${{ github.workspace }}/custom/plugins/${{ env.PLUGIN_NAME }} | |