-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from PAYONE-GmbH/fix-CI
unify CI
- Loading branch information
Showing
2 changed files
with
101 additions
and
94 deletions.
There are no files selected for viewing
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
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 |
This file was deleted.
Oops, something went wrong.