PAYOSWXP-105: Add order action log and webhook log #1081
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: Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
env: | |
MODULE_NAME: PayonePayment | |
COMPOSER_NAME: payone-gmbh/shopware-6 | |
TEST_DATABASE_URL: "mysql://root:[email protected]:3306/shopware" | |
jobs: | |
ci-current: | |
name: SW ${{ matrix.shopware-versions }}, PHP ${{ matrix.php-versions }}, MySQL ${{ matrix.mysql-versions }} | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 15 | |
fail-fast: false | |
matrix: | |
php-versions: [ '8.1', '8.2' ] | |
mysql-versions: [ '5.7', '8.0' ] | |
shopware-versions: [ 'v6.5.0.0', 'v6.5.1.0', 'v6.5.2.0' ] | |
services: | |
mysql: | |
image: mysql:${{ matrix.mysql-versions }} | |
env: | |
MYSQL_DATABASE: shopware | |
MYSQL_ROOT_PASSWORD: root | |
ports: | |
- 3306:3306 | |
steps: | |
- name: Install PHP | |
uses: shivammathur/setup-php@master | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: mbstring, xdebug, curl, dom, fileinfo, gd, iconv, intl, json, xml, mbstring, pdo, phar, zip, sodium, pdo_mysql | |
tools: composer:2.2 | |
- name: "Check PHP Version" | |
run: php -v | |
- name: "Check Composer Version" | |
run: composer -V | |
- name: "Check PHP Extensions" | |
run: php -m | |
- name: "checkout Shopware" | |
uses: actions/checkout@v3 | |
with: | |
repository: shopware/production | |
ref: 'flex' | |
- name: "Checkout ${{ env.COMPOSER_NAME }}" | |
uses: actions/checkout@v3 | |
with: | |
path: custom/plugins/${{ env.MODULE_NAME }} | |
- name: "Get composer cache directory" | |
id: composer-cache | |
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: "Cache Composer dependencies" | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ matrix.operating-system }}-${{ matrix.php-versions }}-${{ matrix.shopware-versions }}-${{ hashFiles('**/composer.lock') }} | |
- name: "Install Shopware dependencies" | |
# Install Shopware with --no-dev to prevent that dev-tools of the module got in conflict with the tools of shopware | |
run: | | |
composer req shopware/administration:${{ matrix.shopware-versions }} shopware/core:${{ matrix.shopware-versions }} shopware/elasticsearch:${{ matrix.shopware-versions }} shopware/storefront:${{ matrix.shopware-versions }} --no-update | |
composer install --no-dev | |
- name: "Install ${{ env.COMPOSER_NAME }}" | |
run: composer req ${{ env.COMPOSER_NAME }} | |
- name: "Install DEV-Tools" | |
working-directory: custom/plugins/${{ env.MODULE_NAME }} | |
run: | | |
composer remove shopware/* --no-update | |
composer install | |
- name: "Run PHPStan" | |
working-directory: custom/plugins/${{ env.MODULE_NAME }} | |
run: ./vendor/bin/phpstan | |
- name: "Check Code style (easy-coding-style)" | |
working-directory: custom/plugins/${{ env.MODULE_NAME }} | |
run: ./vendor/bin/ecs | |
- name: "Check Code style (rector)" | |
working-directory: custom/plugins/${{ env.MODULE_NAME }} | |
run: ./vendor/bin/rector --dry-run | |
- name: "Install Shopware" | |
run: | | |
echo APP_ENV=dev >> .env | |
echo APP_URL=http://localhost >> .env | |
echo DATABASE_URL=${{ env.TEST_DATABASE_URL }} >> .env | |
echo APP_SECRET=secretf0rt3st >> .env | |
bin/console system:install --basic-setup | |
- name: "Run PHPUnit Tests" | |
working-directory: custom/plugins/${{ env.MODULE_NAME }} | |
run: ./vendor/bin/phpunit --testdox | |