-
Notifications
You must be signed in to change notification settings - Fork 19
75 lines (73 loc) · 3.11 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
ci-current:
runs-on: ubuntu-latest
strategy:
max-parallel: 15
fail-fast: false
matrix:
php-versions: [ '7.4', '8.0' ]
shopware-versions: [ 'v6.4.0.0', 'v6.4.1.0', 'v6.4.2.0', 'v6.4.3.0', 'v6.4.4.0', 'v6.4.5.0', 'v6.4.6.0', 'v6.4.7.0', 'v6.4.8.0', 'v6.4.9.0', 'v6.4.10.0', 'v6.4.11.0', 'v6.4.12.0', 'v6.4.13.0', 'v6.4.14.0', 'v6.4.15.0', 'v6.4.16.0', 'v6.4.17.0', 'v6.4.18.0', 'v6.4.19.0', 'v6.4.20.0' ]
name: Shopware ${{ matrix.shopware-versions }} on PHP ${{ matrix.php-versions }}
services:
mysql:
image: mysql:5.7.38
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:2.1.5
- 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: composer ecs
- 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
rm -rf /tmp/shopware/platform
git clone --depth 1 --single-branch -b ${{ matrix.shopware-versions }} https://github.com/shopware/platform /tmp/shopware/platform
cd /tmp/shopware
php psh.phar init
cd /tmp/shopware/vendor/shopware/platform
wget https://github.com/shopware/platform/commit/0e6cbc24383f0123c01f59bd9aae0a49ce739cca.patch
patch -p1 -N < 0e6cbc24383f0123c01f59bd9aae0a49ce739cca.patch || true
- 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: Static code analyze (phpstan)
run: PROJECT_ROOT=/tmp/shopware composer phpstan
- name: PHPUnit
run: |
PROJECT_ROOT=/tmp/shopware \
TEST_DATABASE_URL="mysql://root:[email protected]:3306/shopware" \
/tmp/shopware/custom/plugins/PayonePayment/vendor/bin/phpunit \
--testdox \
--configuration /tmp/shopware/custom/plugins/PayonePayment/phpunit.xml.dist