Skip to content

Commit

Permalink
chore: update test workflow to use new shopware setup
Browse files Browse the repository at this point in the history
  • Loading branch information
tinect authored Aug 18, 2024
1 parent 0832561 commit a1e9911
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
push:
branches:
- 2.0
- '2.0'

jobs:
build:
Expand Down
43 changes: 23 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,35 @@ on:

jobs:
test:
env:
PLUGIN_NAME: FroshProductCompare
strategy:
fail-fast: false
matrix:
version: [ "v6.5.8" ]
container: ghcr.io/friendsofshopware/platform-plugin-dev:${{ matrix.version }}
version: [ "v6.5.8.7", "6.5.x" ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Shopware
uses: shopware/setup-shopware@main
with:
shopware-version: ${{ matrix.version }}
php-version: 8.2
php-extensions: pcov

- name: Prepare
run: |
start-mysql
mysql -V
php -v
cp -r "./" "/plugins/FroshProductCompare"
cd /plugins/FroshProductCompare
composer update -d /opt/shopware
- name: Checkout 2.0
if: github.event_name != 'pull_request'
uses: actions/checkout@v4
with:
ref: v4
path: ${{ github.workspace }}/custom/plugins/${{ env.PLUGIN_NAME }}

- name: Install dependencies for PHPStan
if: matrix.version == 'v6.5.0'
run: |
cd /opt/shopware/
composer require tomasvotruba/type-coverage --dev --no-scripts
- name: Checkout Pull Request
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}/custom/plugins/${{ env.PLUGIN_NAME }}

- name: PHPStan
- name: PHPUnit
working-directory: ${{ github.workspace }}/custom/plugins/${{ env.PLUGIN_NAME }}
run: |
cd /plugins/FroshProductCompare
/opt/shopware/vendor/bin/phpstan analyse -c phpstan.neon.dist
${{ github.workspace }}/vendor/bin/phpstan analyse -c ${{ github.workspace }}/custom/plugins/${{ env.PLUGIN_NAME }}/phpstan.neon.dist

0 comments on commit a1e9911

Please sign in to comment.