- Tests should be run on the latest operating system that is compatible with Sylius compilations.
We use the latest version for Sylius 1.13 with
runs-on: ubuntu-latest
, but you can use older versions if you need. - The name should include reference to the environment version:
Optionally, you can add the action name, for which the build was performed, such as
jobs: tests: name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}"
pull_request
.jobs: tests: name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}, State Machine Adapter ${{ matrix.state_machine_adapter }}"
-
It's important to set fail-fast to false - one unsuccessful test cannot affect the others.
-
PHP - We need to check all PHP versions supported by Sylius. If you're writing builds for sylius 1.13 you should add all supported PHP versions.
Note: Always check the supported PHP versions for the Sylius version you've chosen in the Sylius docs or repository.
Note 2: If you are making builds for multiple Sylius versions, make sure you select a PHP version which is compatible with all the target Sylius versions.
-
Symfony - the Symfony version must be supported by Sylius and PHP version.
-
Sylius - versions of Sylius to check.
-
Node - the Node version must be compatible with the Sylius version. We recommend checking the two LTS (Long-Term Support) versions supported by the Sylius version you are using.
-
MySQL - same case as PHP, Symfony and Node.
-
Rest of the strategy configuration, such as exclusions and state machine adapters, should be based on your specific needs.
-
Always work with the latest versions of PHP, Symfony, Sylius (prefix: "^", like:
sylius: ['^1.13']
)
strategy:
fail-fast: false
matrix:
php: ["8.1", "8.2", "8.3"]
symfony: ["^5.4", "^6.0"]
sylius: ["^1.13"]
node: ["18.x", "20.x"]
mysql: ["8.0"]
state_machine_adapter: ["winzou_state_machine", "symfony_workflow"]