diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5ea91aee5..364e61acc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/sw-64.yml b/.github/workflows/sw-64.yml deleted file mode 100644 index 2ede6a090..000000000 --- a/.github/workflows/sw-64.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: CI-64 - -on: [push, pull_request] - -jobs: - run: - runs-on: ${{ matrix.operating-system }} - strategy: - max-parallel: 15 - fail-fast: false - matrix: - operating-system: [ubuntu-latest] - php-versions: ['7.4', '8.0'] - shopware-versions: ['v6.4.0.0'] - name: Shopware ${{ matrix.shopware-versions }} on PHP ${{ matrix.php-versions }} - services: - mysql: - image: mariadb:latest - 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: 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