Skip to content

Commit

Permalink
Merge pull request #100 from PAYONE-GmbH/fix-CI
Browse files Browse the repository at this point in the history
unify CI
  • Loading branch information
hreinberger authored Jun 9, 2021
2 parents 0e78fe2 + 4561e93 commit 2fd0387
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 94 deletions.
141 changes: 101 additions & 40 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,115 @@
name: CI
name: Tests

on: [push, pull_request]
on: [ push, pull_request ]

jobs:
run:
runs-on: ${{ matrix.operating-system }}
ci-legacy:
runs-on: ubuntu-latest
strategy:
max-parallel: 15
fail-fast: false
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.2', '7.3', '7.4']
shopware-versions: ['v6.2.0', 'v6.2.1', 'v6.2.2', 'v6.2.3', 'v6.3.0.0', 'v6.3.0.1', 'v6.3.0.2', 'v6.3.1.0', 'v6.3.1.1', 'v6.3.2.0', 'v6.3.3.0', 'v6.3.4.0', 'v6.3.5.0']
php-versions: [ '7.2', '7.3', '7.4' ]
shopware-versions: [ 'v6.2.0', 'v6.2.1', 'v6.2.2', 'v6.2.3', 'v6.3.0.0', 'v6.3.0.1', 'v6.3.0.2', 'v6.3.1.0', 'v6.3.1.1', 'v6.3.2.0', 'v6.3.3.0', 'v6.3.4.0', 'v6.3.5.0' ]
name: Shopware ${{ matrix.shopware-versions }} on PHP ${{ matrix.php-versions }}
services:
mysql:
image: mariadb:latest
image: mariadb:10.5.9
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
- 3306:3306
steps:
- name: Checkout
uses: actions/checkout@master
- 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
tools: composer:v1
- name: Check PHP Version
run: php -v
- name: Check Composer Version
run: composer -V
- name: Check PHP Extensions
run: php -m
- name: Composer setup
run: composer install --prefer-dist --no-ansi --no-interaction --no-progress --optimize-autoloader
- name: Codestyle
run: vendor/bin/php-cs-fixer fix -v --dry-run --diff
- name: PHPUnit
run: |
mkdir -p /tmp/shopware
git clone --depth 1 --single-branch -b ${{ matrix.shopware-versions }} https://github.com/shopware/development /tmp/shopware
mkdir /tmp/shopware/custom/plugins/PayonePayment
cp -r * /tmp/shopware/custom/plugins/PayonePayment/
printf "const:\n APP_ENV: \"dev\"\n APP_URL: \"http://localhost\"\n DB_HOST: \"127.0.0.1\"\n DB_PORT: \"3306\"\n DB_NAME: \"shopware\"\n DB_USER: \"root\"\n DB_PASSWORD: \"root\"" > /tmp/shopware/.psh.yaml.override
cd /tmp/shopware
php psh.phar init
composer install --prefer-dist --no-ansi --no-interaction --no-progress --optimize-autoloader --no-scripts
php /tmp/shopware/bin/console plugin:refresh
php /tmp/shopware/bin/console plugin:install --activate PayonePayment
/tmp/shopware/custom/plugins/PayonePayment/vendor/bin/phpunit --configuration custom/plugins/PayonePayment/phpunit.xml.dist
- name: Checkout
uses: actions/checkout@master
- 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
tools: composer:v1
- name: Check PHP Version
run: php -v
- name: Check Composer Version
run: composer -V
- name: Check PHP Extensions
run: php -m
- name: Composer dump autoload
run: composer dumpautoload
- name: SW-Install
run: |
mkdir -p /tmp/shopware
git clone --depth 1 --single-branch -b ${{ matrix.shopware-versions }} https://github.com/shopware/development /tmp/shopware
printf "const:\n APP_ENV: \"dev\"\n APP_URL: \"http://localhost\"\n DB_HOST: \"127.0.0.1\"\n DB_PORT: \"3306\"\n DB_NAME: \"shopware\"\n DB_USER: \"root\"\n DB_PASSWORD: \"root\"" > /tmp/shopware/.psh.yaml.override
cd /tmp/shopware
php psh.phar init
composer install --prefer-dist --no-ansi --no-interaction --no-progress --optimize-autoloader --no-scripts
composer require dms/phpunit-arraysubset-asserts:"^0.3.0" --no-scripts
composer require k10r/codestyle:"^1.0" --no-scripts
composer require phpstan/phpstan:"^0.12" --no-scripts
composer require phpstan/phpstan-phpunit:"^0.12" --no-scripts
- name: Install plugin
run: |
mkdir -p /tmp/shopware/custom/plugins/PayonePayment
cp -r * /tmp/shopware/custom/plugins/PayonePayment
cd /tmp/shopware
php bin/console plugin:refresh
php bin/console plugin:install --activate PayonePayment
- name: PHPUnit
run: |
cd /tmp/shopware
composer dumpautoload -d /tmp/shopware/custom/plugins/PayonePayment
/tmp/shopware/vendor/bin/phpunit --configuration /tmp/shopware/custom/plugins/PayonePayment/phpunit.xml.dist
ci-current:
runs-on: ubuntu-latest
strategy:
max-parallel: 15
fail-fast: false
matrix:
php-versions: [ '7.4' ]
shopware-versions: [ 'v6.4.0.0', 'v6.4.1.0' ]
name: Shopware ${{ matrix.shopware-versions }} on PHP ${{ matrix.php-versions }}
services:
mysql:
image: mariadb:10.5.9
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
steps:
- name: Checkout
uses: actions/checkout@master
- 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
tools: composer:v2
- name: Check PHP Version
run: php -v
- name: Check Composer Version
run: composer -V
- name: Check PHP Extensions
run: php -m
- name: Composer setup
run: composer install --prefer-dist --no-ansi --no-interaction --no-progress --optimize-autoloader
- name: Codestyle
run: vendor/bin/php-cs-fixer fix -v --dry-run --diff
- name: SW-Install
run: |
mkdir -p /tmp/shopware
git clone --depth 1 --single-branch -b ${{ matrix.shopware-versions }} https://github.com/shopware/development /tmp/shopware
printf "const:\n APP_ENV: \"dev\"\n APP_URL: \"http://localhost\"\n DB_HOST: \"127.0.0.1\"\n DB_PORT: \"3306\"\n DB_NAME: \"shopware\"\n DB_USER: \"root\"\n DB_PASSWORD: \"root\"" > /tmp/shopware/.psh.yaml.override
cd /tmp/shopware
php psh.phar init
composer install --prefer-dist --no-ansi --no-interaction --no-progress --optimize-autoloader --no-scripts
- name: Install plugin
run: |
mkdir -p /tmp/shopware/custom/plugins/PayonePayment
cp -r * /tmp/shopware/custom/plugins/PayonePayment
cd /tmp/shopware
php bin/console plugin:refresh
php bin/console plugin:install --activate PayonePayment
- name: PHPUnit
run: |
/tmp/shopware/custom/plugins/PayonePayment/vendor/bin/phpunit --configuration /tmp/shopware/custom/plugins/PayonePayment/phpunit.xml.dist
54 changes: 0 additions & 54 deletions .github/workflows/sw-64.yml

This file was deleted.

0 comments on commit 2fd0387

Please sign in to comment.