Skip to content

Commit 9ce705d

Browse files
authored
chore: run Integration test in seperate job
1 parent 283a7d7 commit 9ce705d

File tree

1 file changed

+41
-8
lines changed

1 file changed

+41
-8
lines changed

.github/workflows/test.yml

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
workflow_call:
1010

1111
jobs:
12-
test:
12+
Test:
1313
env:
1414
PLUGIN_NAME: FroshPlatformThumbnailProcessor
1515
strategy:
@@ -39,7 +39,7 @@ jobs:
3939
with:
4040
path: ${{ github.workspace }}/custom/plugins/${{ env.PLUGIN_NAME }}
4141

42-
- name: Run Tests
42+
- name: Run UnitTests
4343
working-directory: ${{ github.workspace }}/custom/plugins/${{ env.PLUGIN_NAME }}
4444
run: |
4545
composer create-placeholders
@@ -53,18 +53,51 @@ jobs:
5353
root_dir: ${{ github.workspace }}/custom/plugins/${{ env.PLUGIN_NAME }}
5454
working-directory: ${{ github.workspace }}/custom/plugins/${{ env.PLUGIN_NAME }}
5555

56-
- name: Setup Shopware for Integration
56+
# we call this after PHPUnit to make sure that the generated files are available
57+
- name: PHPStan
58+
run: |
59+
${{ github.workspace }}/vendor/bin/phpstan analyse -c ${{ github.workspace }}/custom/plugins/${{ env.PLUGIN_NAME }}/phpstan.neon
60+
61+
IntegrationTest:
62+
env:
63+
PLUGIN_NAME: FroshPlatformThumbnailProcessor
64+
strategy:
65+
fail-fast: false
66+
matrix:
67+
version: [ "v6.6.1.1", "v6.6.0.3", "trunk" ]
68+
php-version: [ "8.2" ]
69+
runs-on: ubuntu-latest
70+
steps:
71+
- name: Setup Shopware
5772
uses: shopware/setup-shopware@main
5873
with:
5974
shopware-version: ${{ matrix.version }}
6075
php-version: ${{ matrix.php-version }}
6176

77+
- name: Info
78+
run: |
79+
php bin/console -V
80+
mysql -V
81+
php -v
82+
composer -V
83+
echo ${{ github.workspace }}
84+
85+
- name: Checkout
86+
uses: actions/checkout@v3
87+
with:
88+
path: ${{ github.workspace }}/custom/plugins/${{ env.PLUGIN_NAME }}
89+
6290
- name: PHPUnit Integration
6391
working-directory: ${{ github.workspace }}/custom/plugins/${{ env.PLUGIN_NAME }}
6492
run: |
65-
php ${{ github.workspace }}/vendor/bin/phpunit --testsuite Integration
93+
composer create-placeholders
94+
php -d pcov.enabled=1 ${{ github.workspace }}/vendor/bin/phpunit --testsuite Integration
95+
96+
- uses: codecov/codecov-action@v3
97+
env:
98+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
99+
with:
100+
files: ./clover.xml
101+
root_dir: ${{ github.workspace }}/custom/plugins/${{ env.PLUGIN_NAME }}
102+
working-directory: ${{ github.workspace }}/custom/plugins/${{ env.PLUGIN_NAME }}
66103

67-
# we call this after PHPUnit to make sure that the generated files are available
68-
- name: PHPStan
69-
run: |
70-
${{ github.workspace }}/vendor/bin/phpstan analyse -c ${{ github.workspace }}/custom/plugins/${{ env.PLUGIN_NAME }}/phpstan.neon

0 commit comments

Comments
 (0)