Skip to content

Commit

Permalink
OP-370 - Upgrade build
Browse files Browse the repository at this point in the history
  • Loading branch information
JanPalen committed Jul 25, 2024
1 parent 6d429f0 commit de8f5d8
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 13 deletions.
31 changes: 20 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,31 @@ on:

jobs:
tests:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest

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

strategy:
fail-fast: false
matrix:
php: ["8.1", "8.2"]
symfony: ["^5.4", "^6.0"]
sylius: ["~1.12.0"]
node: ["14.x"]
php: ["8.0", "8.1", "8.2", "8.3"]
symfony: ["^5.4", "^6.4"]
sylius: ["~1.12.0", "~1.13.0"]
node: ["^18.0", "^20.0"]
mysql: ["8.0"]
exclude:
- sylius: "~1.13.0"
php: "8.0"
- symfony: "^6.4"
php: "8.0"

env:
APP_ENV: test
DATABASE_URL: "mysql://root:[email protected]/sylius?serverVersion=${{ matrix.mysql }}"

steps:
-
uses: actions/checkout@v2
uses: actions/checkout@v3

-
name: Setup PHP
Expand All @@ -43,7 +48,7 @@ jobs:

-
name: Setup Node
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: "${{ matrix.node }}"

Expand Down Expand Up @@ -81,7 +86,7 @@ jobs:

-
name: Cache Composer
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json **/composer.lock') }}
Expand Down Expand Up @@ -133,7 +138,7 @@ jobs:
name: Prepare test application assets
run: |
(cd tests/Application && bin/console assets:install public -vvv)
(cd tests/Application && yarn build)
(cd tests/Application && yarn encore dev)
-
name: Prepare test application cache
Expand All @@ -151,6 +156,10 @@ jobs:
name: Validate database schema
run: (cd tests/Application && bin/console doctrine:schema:validate)

-
name: Run ECS
run: vendor/bin/ecs check src

-
name: Run PHPStan
run: vendor/bin/phpstan analyse
Expand All @@ -165,13 +174,13 @@ jobs:

-
name: Upload Behat logs
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: failure()
with:
name: Behat logs
path: etc/build/
if-no-files-found: ignore

-
name: Failed build Slack notification
uses: rtCamp/action-slack-notify@v2
Expand Down
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"bitbag/shipping-export-plugin": "^3.0",
"msztorc/php-dpd-api": "^2.1",
"sylius/sylius": "~1.12.0 || ~1.13.0",
"symfony/webpack-encore-bundle": "^1.17"
"symfony/webpack-encore-bundle": "^1.17",
"ext-soap": "*"
},
"require-dev": {
"behat/behat": "^3.6.1",
Expand Down Expand Up @@ -47,7 +48,8 @@
"league/flysystem-bundle": "2.4.0"
},
"conflict": {
"sylius/resource-bundle": "1.9.1 || 1.9.0"
"sylius/resource-bundle": "1.9.1 || 1.9.0",
"behat/mink-selenium2-driver": ">=1.7.0"
},
"config": {
"sort-packages": true,
Expand Down
9 changes: 9 additions & 0 deletions tests/Application/config/bundles.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file has been created by developers from BitBag.
* Feel free to contact us once you face any issues or want to start
* You can find more information about us on https://bitbag.io and write us
* an email on [email protected].
*/

declare(strict_types=1);

return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Expand Down
2 changes: 2 additions & 0 deletions tests/Application/config/sylius/1.13/bundles.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<?php

/*
* This file has been created by developers from BitBag.
* Feel free to contact us once you face any issues or want to start
* You can find more information about us on https://bitbag.io and write us
* an email on [email protected].
*/

declare(strict_types=1);

return [
Expand Down

0 comments on commit de8f5d8

Please sign in to comment.