-
Notifications
You must be signed in to change notification settings - Fork 19
156 lines (156 loc) · 6.75 KB
/
sylius.yaml
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: Sylius
'on':
push:
branches:
- develop
- qa
- master
paths-ignore:
- README.md
pull_request:
paths-ignore:
- README.md
jobs:
sylius:
name: 'PHPUnit-Behat (PHP ${{ matrix.php }} Sylius ${{ matrix.sylius }} Symfony ${{ matrix.symfony }})'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php:
- 8.0
- 8.1
sylius:
- 1.11.0
- 1.12.0
symfony:
- 5.4
- 6.1
node:
- 14.x
exclude:
-
sylius: 1.11.0
symfony: 6.1
-
php: '8.0'
symfony: 6.1
-
sylius: 1.9.0
symfony: 6.1
-
sylius: 1.10.0
symfony: 6.1
-
sylius: 1.11.0
symfony: 6.1
-
php: '8.0'
symfony: 6.1
env:
APP_ENV: test
package-name: payplug/sylius-payplug-plugin
steps:
-
name: 'Setup PHP'
uses: shivammathur/setup-php@v2
with:
php-version: '${{ matrix.php }}'
ini-values: date.timezone=UTC
extensions: intl
tools: symfony
coverage: none
-
name: 'Setup Node'
uses: actions/setup-node@v1
with:
node-version: '${{ matrix.node }}'
-
name: 'Wkhtmltopdf - Install'
run: "sudo apt-get update\nsudo apt-get install xvfb libfontconfig wkhtmltopdf\nprintf '#!/bin/bash\\nxvfb-run -a --server-args=\"-screen 0, 1024x768x24\" /usr/bin/wkhtmltopdf -q $*' | sudo tee /usr/bin/wkhtmltopdf.sh\nsudo chmod a+x /usr/bin/wkhtmltopdf.sh\nsudo ln -s /usr/bin/wkhtmltopdf.sh /usr/local/bin/wkhtmltopdf\n"
-
uses: actions/checkout@v2
-
name: 'Composer - Get Cache Directory'
id: composer-cache
run: 'echo "::set-output name=dir::$(composer config cache-files-dir)"'
-
name: 'Composer - Set cache'
uses: actions/cache@v2
id: cache-composer
with:
path: '${{ steps.composer-cache.outputs.dir }}'
key: 'php-${{ matrix.php }}-sylius-${{ matrix.sylius }}-symfony-${{ matrix.symfony }}-composer-${{ hashFiles(''**/composer.json'') }}'
restore-keys: 'php-${{ matrix.php }}-sylius-${{ matrix.sylius }}-symfony-${{ matrix.symfony }}-composer-'
-
name: 'Composer - Create cache directory'
run: 'mkdir -p /home/runner/.composer/cache'
if: 'steps.cache-composer.outputs.cache-hit != ''true'''
-
name: 'Composer - Github Auth'
run: 'composer config -g github-oauth.github.com ${{ github.token }}'
-
name: 'Yarn - Get cache directory'
id: yarn-cache
run: 'echo "::set-output name=dir::$(yarn cache dir)"'
-
name: 'Yarn - Set Cache'
uses: actions/cache@v2
with:
path: '${{ steps.yarn-cache.outputs.dir }}'
key: 'node-${{ matrix.node }}-yarn-${{ hashFiles(''**/package.json **/yarn.lock'') }}'
restore-keys: "node-${{ matrix.node }}-yarn-\n"
-
name: 'Install Sylius-Standard and Plugin'
env:
SYMFONY_REQUIRE: '${{ matrix.symfony }}.*'
run: 'make install -e SYLIUS_VERSION=${{ matrix.sylius }} SYMFONY_VERSION=${{ matrix.symfony }} PHP_VERSION=${{ matrix.php }}'
-
name: 'Output PHP version for Symfony CLI'
working-directory: ./tests/Application
run: 'php -v | head -n 1 | awk ''{ print $2 }'' > .php-version'
-
name: 'Install certificates'
working-directory: ./tests/Application
run: 'symfony server:ca:install'
-
name: 'Run Chrome headless'
working-directory: ./tests/Application
run: 'google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server=''direct://'' --proxy-bypass-list=''*'' https://127.0.0.1 > /dev/null 2>&1 &'
-
name: 'Run webserver'
working-directory: ./tests/Application
run: 'symfony server:start --port=8080 --dir=public --daemon'
id: end-of-setup-sylius
-
name: 'Doctrine Schema Validate - Run'
working-directory: ./tests/Application
run: 'php bin/console doctrine:schema:validate --skip-sync'
if: 'always() && steps.end-of-setup-sylius.outcome == ''success'''
-
name: 'Run PHPUnit'
run: 'make phpunit'
if: 'always() && steps.end-of-setup-sylius.outcome == ''success'''
-
name: 'Configure Behat'
run: 'make behat-configure'
if: 'always() && steps.end-of-setup-sylius.outcome == ''success'''
-
name: 'Run behat'
working-directory: ./tests/Application
run: 'vendor/bin/behat --strict --no-interaction -f progress || vendor/bin/behat --strict -vvv --no-interaction --rerun'
if: 'always() && steps.end-of-setup-sylius.outcome == ''success'''
-
uses: actions/[email protected]
if: failure()
with:
name: logs
path: ./tests/Application/etc/build
services:
mariadb:
image: 'mariadb:10.4.11'
ports:
- '3306:3306'
env:
MYSQL_ALLOW_EMPTY_PASSWORD: true
options: '--health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3'