forked from PAYONE-GmbH/oxid-6
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (62 loc) · 2.94 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
name: CI
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']
oxid-versions: ['dev-b-6.2-ce', 'dev-b-6.3-ce', 'dev-b-6.4-ce']
exclude:
- php-versions: '8.0'
oxid-versions: 'dev-b-6.2-ce'
name: Oxid ${{ matrix.oxid-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, gd, bcmath, ctype, curl, dom, hash, iconv, intl, openssl, simplexml, soap, xsl, 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: PHP Syntax Checker
run: find . -type f -name '*.php' -print0 | xargs -0 -n1 -P4 php -l -n | (! grep -v "No syntax errors detected" )
- name: Setup Oxid 6
run: |
mkdir /tmp/oxid6
cd /tmp/oxid6
composer create-project -n --no-progress oxid-esales/oxideshop-project . ${{ matrix.oxid-versions }}
cp /tmp/oxid6/source/config.inc.php.dist /tmp/oxid6/source/config.inc.php
sed -i 's|<dbHost>|127.0.0.1|; s|<dbName>|oxideshop|; s|<dbUser>|root|; s|<dbPwd>|root|; s|<sShopURL>|http://localhost|; s|<sShopDir>|/tmp/oxid6/source|; s|<sCompileDir>|/tmp/oxid6/source/tmp|; s|\$this->iDebug = 0|\$this->iDebug = 1|' /tmp/oxid6/source/config.inc.php
sed -i "s|\$this->edition = ''|\$this->edition = 'CE'|" /tmp/oxid6/source/config.inc.php
sed -i "s|partial_module_paths: null|partial_module_paths: 'fc/fcpayone'|" /tmp/oxid6/test_config.yml
chmod -R 777 /tmp/oxid6/source/log
- name: Fiddle with plugin if exists, and install fresh
# Metapackage 6.2-beta1 doesn't include payone, need to fetch from composer first
run: |
if ! grep -q "payone-gmbh/oxid-6" /tmp/oxid6/vendor/oxid-esales/oxideshop-metapackage-ce/composer.json; then composer --working-dir=/tmp/oxid6 require payone-gmbh/oxid-6; fi
[ -d /tmp/oxid6/source/modules/fc/fcpayone ] && { echo "Removing from modules"; rm -rf /tmp/oxid6/source/modules/fc/fcpayone; }
[ -d /tmp/oxid6/vendor/payone-gmbh/oxid-6 ] && { echo "Removing from vendor"; rm -rf /tmp/oxid6/vendor/payone-gmbh/oxid-6; }
mkdir -p /tmp/oxid6/source/modules/fc/fcpayone
cp -R $GITHUB_WORKSPACE/* /tmp/oxid6/source/modules/fc/fcpayone
- name: Run tests
# Run composer update to make services available, see #128
run: |
php /tmp/oxid6/vendor/bin/runtests /tmp/oxid6/source/modules/fc/fcpayone/tests