|
| 1 | +name: "Behat tests" |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + push: |
| 6 | + |
| 7 | +jobs: |
| 8 | + phpunit: |
| 9 | + name: "Behat tests" |
| 10 | + |
| 11 | + runs-on: ${{ matrix.operating-system }} |
| 12 | + |
| 13 | + strategy: |
| 14 | + matrix: |
| 15 | + dependencies: |
| 16 | + - "locked" |
| 17 | + php-version: |
| 18 | + - "8.1" |
| 19 | + operating-system: |
| 20 | + - "ubuntu-latest" |
| 21 | + |
| 22 | + steps: |
| 23 | + - name: "Checkout" |
| 24 | + uses: "actions/checkout@v3" |
| 25 | + |
| 26 | + - name: "Install PHP" |
| 27 | + uses: "shivammathur/setup-php@2.18.1" |
| 28 | + with: |
| 29 | + php-version: "${{ matrix.php-version }}" |
| 30 | + ini-values: memory_limit=-1 |
| 31 | + tools: composer:v2, cs2pr |
| 32 | + |
| 33 | + - name: Get composer cache directory |
| 34 | + id: composer-cache |
| 35 | + run: echo "::set-output name=dir::$(composer config cache-files-dir)" |
| 36 | + |
| 37 | + - name: "Cache dependencies" |
| 38 | + uses: "actions/cache@v3.0.4" |
| 39 | + with: |
| 40 | + path: ${{ steps.composer-cache.outputs.dir }} |
| 41 | + key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}" |
| 42 | + restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" |
| 43 | + |
| 44 | + - name: "Install lowest dependencies" |
| 45 | + if: ${{ matrix.dependencies == 'lowest' }} |
| 46 | + run: "composer update --prefer-lowest --no-interaction --no-progress" |
| 47 | + |
| 48 | + - name: "Install highest dependencies" |
| 49 | + if: ${{ matrix.dependencies == 'highest' }} |
| 50 | + run: "composer update --no-interaction --no-progress" |
| 51 | + |
| 52 | + - name: "Install locked dependencies" |
| 53 | + if: ${{ matrix.dependencies == 'locked' }} |
| 54 | + run: "composer install --no-interaction --no-progress" |
| 55 | + |
| 56 | + - name: "Install development dependencies" |
| 57 | + if: ${{ matrix.dependencies == 'development' }} |
| 58 | + run: "composer config minimum-stability dev && composer update --no-interaction --no-progress" |
| 59 | + |
| 60 | + - name: "Tests" |
| 61 | + run: "make behat" |
0 commit comments