Merge pull request #27 from FriendsOfBehat/fix/ci-lock-scripts #35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| release: | |
| types: [created] | |
| schedule: | |
| - | |
| cron: "0 1 * * 6" # Run at 1am every Saturday | |
| jobs: | |
| test: | |
| name: PHP ${{ matrix.php-version }} + Symfony ${{ matrix.symfony-version }} + Behat ${{ matrix.behat-version }} | |
| runs-on: ubuntu-latest | |
| continue-on-error: ${{ matrix.experimental }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Behat 3.31 only supports symfony/config ^5.4||^6.4||^7.0, so only Symfony 7.4 here | |
| php-version: | |
| - '8.3' | |
| - '8.4' | |
| - '8.5' | |
| symfony-version: | |
| - '7.4.*' | |
| behat-version: | |
| - '3.31.*' | |
| experimental: | |
| - false | |
| include: | |
| # Behat 4 + Symfony 7.4 (all PHP versions) | |
| - | |
| php-version: '8.3' | |
| symfony-version: '7.4.*' | |
| behat-version: '4.x-dev as 4.0.0' | |
| experimental: true | |
| - | |
| php-version: '8.4' | |
| symfony-version: '7.4.*' | |
| behat-version: '4.x-dev as 4.0.0' | |
| experimental: true | |
| - | |
| php-version: '8.5' | |
| symfony-version: '7.4.*' | |
| behat-version: '4.x-dev as 4.0.0' | |
| experimental: true | |
| # Behat 4 + Symfony 8.x requires PHP >=8.4 | |
| - | |
| php-version: '8.4' | |
| symfony-version: '8.0.*' | |
| behat-version: '4.x-dev as 4.0.0' | |
| experimental: true | |
| - | |
| php-version: '8.4' | |
| symfony-version: '8.1.*' | |
| behat-version: '4.x-dev as 4.0.0' | |
| experimental: true | |
| - | |
| php-version: '8.5' | |
| symfony-version: '8.0.*' | |
| behat-version: '4.x-dev as 4.0.0' | |
| experimental: true | |
| - | |
| php-version: '8.5' | |
| symfony-version: '8.1.*' | |
| behat-version: '4.x-dev as 4.0.0' | |
| experimental: true | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| coverage: none | |
| ini-values: "memory_limit=-1, zend.assertions=1" | |
| php-version: ${{ matrix.php-version }} | |
| tools: composer:v2 | |
| - name: Lock Symfony version | |
| run: VERSION=${{ matrix.symfony-version }} .github/workflows/lock-symfony-version.sh | |
| - name: Lock Behat version | |
| run: VERSION="${{ matrix.behat-version }}" .github/workflows/lock-behat-version.sh | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress | |
| - name: Run tests | |
| run: composer test | |
| phpstan: | |
| name: PHPStan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| coverage: none | |
| ini-values: "memory_limit=-1, zend.assertions=1" | |
| php-version: 8.3 | |
| tools: composer:v2 | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress | |
| - name: Run PHPStan | |
| run: composer phpstan | |
| cs: | |
| name: PHP CS Fixer | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| coverage: none | |
| ini-values: "memory_limit=-1, zend.assertions=1" | |
| php-version: 8.3 | |
| tools: composer:v2 | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress | |
| - name: Run PHP CS Fixer | |
| run: composer cs | |
| psalm: | |
| name: Run Psalm | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| coverage: none | |
| ini-values: "memory_limit=-1, zend.assertions=1" | |
| php-version: 8.3 | |
| tools: composer:v2 | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress | |
| - name: Run Psalm | |
| run: vendor/bin/psalm src --no-progress | |
| validate-composer: | |
| name: Validate composer.json | |
| runs-on: ubuntu-latest | |
| continue-on-error: false | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| coverage: none | |
| ini-values: "memory_limit=-1, zend.assertions=1" | |
| php-version: 8.3 | |
| tools: composer:v2 | |
| - name: Validate composer.json | |
| run: composer validate --strict |