Skip to content

Latest commit

 

History

History
44 lines (41 loc) · 2.35 KB

3_JobsAndStrategySubchapter.md

File metadata and controls

44 lines (41 loc) · 2.35 KB

Jobs:

  1. 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.
  2. The name should include reference to the environment version:
       jobs:
         tests:
            name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}"
    Optionally, you can add the action name, for which the build was performed, such as pull_request.
          jobs:
            tests:
               name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}, State Machine Adapter ${{ matrix.state_machine_adapter }}"

Strategy:

  1. It's important to set fail-fast to false - one unsuccessful test cannot affect the others.

  2. 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.

  3. Symfony - the Symfony version must be supported by Sylius and PHP version.

  4. Sylius - versions of Sylius to check.

  5. 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.

  6. MySQL - same case as PHP, Symfony and Node.

  7. Rest of the strategy configuration, such as exclusions and state machine adapters, should be based on your specific needs.

  8. Always work with the latest versions of PHP, Symfony, Sylius (prefix: "^", like: sylius: ['^1.13'] )

Example code:

 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"]