Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unify CI #100

Merged
merged 1 commit into from
Jun 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.