Skip to content

Commit 8d50d5f

Browse files
Merge pull request #498 from SzymonKostrubiec/OP-278
Op 278 - Add sylius 1.13 support
2 parents 3ff13b1 + be47e7e commit 8d50d5f

96 files changed

Lines changed: 413 additions & 672 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
File renamed without changes.

.github/workflows/build.yml

Lines changed: 25 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -14,43 +14,39 @@ on:
1414

1515
jobs:
1616
tests:
17-
runs-on: ubuntu-22.04
17+
runs-on: ubuntu-latest
1818

1919
name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}"
2020

2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
php: ["8.0"]
25-
symfony: ["^5.4", "^6.0"]
26-
sylius: ["~1.11.0", "~1.12.0"]
27-
node: ["^14.17.x"]
24+
php: ["8.1", "8.2", "8.3"]
25+
symfony: ["^5.4", "^6.4"]
26+
sylius: ["~1.12.0", "~1.13.0"]
27+
node: ["18.x", "20.x"]
2828
mysql: ["8.0"]
2929

30-
exclude:
31-
- sylius: ~1.11.0
32-
symfony: "^6.0"
33-
3430
env:
3531
APP_ENV: test
3632
DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.mysql }}"
3733

3834
steps:
3935
-
40-
uses: actions/checkout@v2
36+
uses: actions/checkout@v3
4137

4238
-
4339
name: Setup PHP
4440
uses: shivammathur/setup-php@v2
4541
with:
4642
php-version: "${{ matrix.php }}"
4743
extensions: intl
48-
tools: symfony
44+
tools: flex, symfony
4945
coverage: none
5046

5147
-
5248
name: Setup Node
53-
uses: actions/setup-node@v1
49+
uses: actions/setup-node@v4
5450
with:
5551
node-version: "${{ matrix.node }}"
5652

@@ -73,8 +69,7 @@ jobs:
7369
name: Install certificates
7470
run: symfony server:ca:install
7571

76-
-
77-
name: Run Chrome Headless
72+
- name: Run Chrome Headless
7873
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='*' http://127.0.0.1 > /dev/null 2>&1 &
7974

8075
-
@@ -84,69 +79,62 @@ jobs:
8479
-
8580
name: Get Composer cache directory
8681
id: composer-cache
87-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
82+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
8883

8984
-
9085
name: Cache Composer
91-
uses: actions/cache@v2
86+
uses: actions/cache@v4
9287
with:
9388
path: ${{ steps.composer-cache.outputs.dir }}
9489
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json **/composer.lock') }}
9590
restore-keys: |
9691
${{ runner.os }}-php-${{ matrix.php }}-composer-
9792
98-
-
99-
name: Restrict Symfony version
100-
if: matrix.symfony != ''
101-
run: |
102-
composer global config --no-plugins allow-plugins.symfony/flex true
103-
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^1.10"
104-
composer config extra.symfony.require "${{ matrix.symfony }}"
105-
10693
-
10794
name: Restrict Sylius version
10895
if: matrix.sylius != ''
10996
run: composer require "sylius/sylius:${{ matrix.sylius }}" --no-update --no-scripts --no-interaction
11097

11198
-
11299
name: Install PHP dependencies
113-
run: composer install --no-interaction --no-scripts
100+
run: composer install --no-interaction
101+
env:
102+
SYMFONY_REQUIRE: ${{ matrix.symfony }}
103+
104+
-
105+
name: Install Behat driver
106+
run: vendor/bin/bdi browser:google-chrome drivers
114107

115108
-
116109
name: Get Yarn cache directory
117110
id: yarn-cache
118-
run: echo "::set-output name=dir::$(yarn cache dir)"
111+
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
119112

120113
-
121114
name: Cache Yarn
122-
uses: actions/cache@v2
115+
uses: actions/cache@v4
123116
with:
124117
path: ${{ steps.yarn-cache.outputs.dir }}
125118
key: ${{ runner.os }}-node-${{ matrix.node }}-yarn-${{ hashFiles('**/package.json **/yarn.lock') }}
126119
restore-keys: |
127120
${{ runner.os }}-node-${{ matrix.node }}-yarn-
128121
129-
-
130-
name: Copy package.json.dist to package.json
131-
if: matrix.sylius != ''
132-
run: (cd tests/Application && cp package.json.\${{ matrix.sylius }}.dist package.json)
133-
134122
-
135123
name: Install JS dependencies
136124
run: |
137125
(cd tests/Application && yarn install)
138-
(cd tests/Application && yarn encore dev)
139126
140127
-
141128
name: Prepare test application database
142129
run: |
143130
(cd tests/Application && bin/console doctrine:database:create -vvv)
144-
(cd tests/Application && bin/console doctrine:schema:create -vvv)
131+
(cd tests/Application && bin/console doctrine:migrations:migrate -n -vvv -q)
145132
146133
-
147134
name: Prepare test application assets
148135
run: |
149136
(cd tests/Application && bin/console assets:install public -vvv)
137+
(cd tests/Application && yarn build:prod)
150138
151139
-
152140
name: Prepare test application cache
@@ -174,11 +162,11 @@ jobs:
174162

175163
-
176164
name: Run Behat
177-
run: vendor/bin/behat --colors --strict -vvv --no-interaction || vendor/bin/behat --colors --strict -vvv --no-interaction --rerun
165+
run: vendor/bin/behat --colors --strict -vvv --no-interaction -f progress || vendor/bin/behat --colors --strict -vvv --no-interaction -f progress --rerun
178166

179167
-
180168
name: Upload Behat logs
181-
uses: actions/upload-artifact@v2
169+
uses: actions/upload-artifact@v3
182170
if: failure()
183171
with:
184172
name: Behat logs
@@ -196,4 +184,4 @@ jobs:
196184
SLACK_MESSAGE: ':x:'
197185
SLACK_TITLE: Failed build on ${{ github.event.repository.name }} repository
198186
SLACK_USERNAME: ${{ secrets.FAILED_BUILD_SLACK_USERNAME }}
199-
SLACK_WEBHOOK: ${{ secrets.FAILED_BUILD_SLACK_WEBHOOK }}
187+
SLACK_WEBHOOK: ${{ secrets.FAILED_BUILD_SLACK_WEBHOOK }}

.github/workflows/coding_standard.yml

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,56 +16,43 @@ jobs:
1616
tests:
1717
runs-on: ubuntu-latest
1818

19-
name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}"
19+
name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}"
2020

2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
php: ["8.0"]
25-
symfony: ["^5.4", "^6.0"]
26-
sylius: ["~1.11.0", "~1.12.0"]
27-
node: ["^14.17.x"]
28-
mysql: ["8.0"]
29-
30-
exclude:
31-
- sylius: ~1.11.0
32-
symfony: "^6.0"
24+
php: ["8.1"]
25+
symfony: ["^5.4", "^6.4"]
26+
sylius: ["~1.13.0"]
27+
node: ["20.x"]
3328

3429
env:
3530
APP_ENV: test
36-
DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.mysql }}"
3731

3832
steps:
3933
-
40-
uses: actions/checkout@v2
34+
uses: actions/checkout@v3
4135
-
4236
name: Setup PHP
4337
uses: shivammathur/setup-php@v2
4438
with:
4539
php-version: "${{ matrix.php }}"
4640
extensions: intl
47-
tools: symfony
41+
tools: flex, symfony
4842
coverage: none
4943
-
5044
name: Get Composer cache directory
5145
id: composer-cache
52-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
46+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
5347

5448
-
5549
name: Cache Composer
56-
uses: actions/cache@v2
50+
uses: actions/cache@v4
5751
with:
5852
path: ${{ steps.composer-cache.outputs.dir }}
5953
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json **/composer.lock') }}
6054
restore-keys: |
6155
${{ runner.os }}-php-${{ matrix.php }}-composer-
62-
-
63-
name: Restrict Symfony version
64-
if: matrix.symfony != ''
65-
run: |
66-
composer global config --no-plugins allow-plugins.symfony/flex true
67-
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^1.10"
68-
composer config extra.symfony.require "${{ matrix.symfony }}"
6956
-
7057
name: Restrict Sylius version
7158
if: matrix.sylius != ''
@@ -74,10 +61,12 @@ jobs:
7461
-
7562
name: Install PHP dependencies
7663
run: composer install --no-interaction
64+
env:
65+
SYMFONY_REQUIRE: ${{ matrix.symfony }}
7766

7867
-
7968
name: Run PHPStan
80-
run: vendor/bin/phpstan analyse -c phpstan.neon -l 8 src/
69+
run: vendor/bin/phpstan analyse
8170

8271
- name: Run ECS
8372
run: vendor/bin/ecs
@@ -92,4 +81,4 @@ jobs:
9281
SLACK_MESSAGE: ':x:'
9382
SLACK_TITLE: Failed build on ${{ github.event.repository.name }} repository
9483
SLACK_USERNAME: ${{ secrets.FAILED_BUILD_SLACK_USERNAME }}
95-
SLACK_WEBHOOK: ${{ secrets.FAILED_BUILD_SLACK_WEBHOOK }}
84+
SLACK_WEBHOOK: ${{ secrets.FAILED_BUILD_SLACK_WEBHOOK }}

0 commit comments

Comments
 (0)