Skip to content

Commit

Permalink
feat: add pipeline to check phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
tinect committed Sep 9, 2023
1 parent 5035474 commit cef16f2
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Test
on:
push:
branches:
- 'main'
- 'feat/phpstan'
tags-ignore:
- '*'
pull_request:
schedule:
- cron: "5 15 * * *"

jobs:
test:
strategy:
fail-fast: false
matrix:
version: [ "v6.5.0", "v6.5.1", "v6.5.2", "v6.5.3", "v6.5.4", "trunk" ]
container: ghcr.io/friendsofshopware/platform-plugin-dev:${{ matrix.version }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Test
run: |
start-mysql
mysql -V
php -v
cp -r "./" "/plugins/FroshProductCompare"
cd /plugins/FroshProductCompare
composer update -d /opt/shopware
php -d pcov.enabled=1 /opt/shopware/vendor/bin/phpunit --coverage-clover clover.xml
- uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./clover.xml
root_dir: /plugins/FroshProductCompare
working-directory: /plugins/FroshProductCompare

- name: Install dependencies for PHPStan
if: matrix.version == 'v6.5.0'
run: |
cd /opt/shopware/
composer require tomasvotruba/type-coverage --dev --no-scripts
- name: PHPStan
run: |
cd /plugins/FroshProductCompare
/opt/shopware/vendor/bin/phpstan analyse -c phpstan.neon.dist

0 comments on commit cef16f2

Please sign in to comment.