|
39 | 39 |
|
40 | 40 | jobs: |
41 | 41 | test: |
42 | | - name: (PHP ${{ matrix.php }}, ${{ matrix.os }}, ${{ matrix.dependencies }} deps |
| 42 | + timeout-minutes: 4 |
43 | 43 | runs-on: ${{ matrix.os }} |
44 | | - timeout-minutes: ${{ matrix.timeout-minutes }} |
45 | | - env: { GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' } |
| 44 | + concurrency: |
| 45 | + cancel-in-progress: true |
| 46 | + group: testing-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.php-version }}-${{ matrix.dependencies }} |
46 | 47 | strategy: |
47 | | - fail-fast: ${{ inputs.fail-fast }} |
| 48 | + fail-fast: false |
48 | 49 | matrix: |
49 | | - php: [ 8.1, 8.2 ] |
50 | | - os: [ ubuntu-latest, windows-latest ] |
51 | | - dependencies: [ lowest , highest ] |
52 | | - timeout-minutes: [ '${{ inputs.test-timeout }}' ] |
53 | | - exclude: |
54 | | - - os: windows-latest |
55 | | - php: 8.2 |
56 | | - include: |
57 | | - - os: ubuntu-latest |
58 | | - php: 8.3 |
59 | | - dependencies: highest |
60 | | - timeout-minutes: 40 |
| 50 | + os: |
| 51 | + - ubuntu-latest |
| 52 | + php-version: |
| 53 | + - '8.1' |
| 54 | + - '8.2' |
| 55 | + - '8.3' |
| 56 | + - '8.4' |
| 57 | + dependencies: |
| 58 | + - lowest |
| 59 | + - locked |
| 60 | + - highest |
61 | 61 | steps: |
62 | | - - name: Set Git To Use LF |
63 | | - run: | |
64 | | - git config --global core.autocrlf false |
65 | | - git config --global core.eol lf |
| 62 | + - name: 📦 Check out the codebase |
| 63 | + uses: actions/checkout@v5 |
66 | 64 |
|
67 | | - - name: Setup PHP ${{ matrix.php }} |
| 65 | + - name: 🛠️ Setup PHP |
68 | 66 | uses: shivammathur/setup-php@v2 |
69 | 67 | with: |
70 | | - php-version: ${{ matrix.php }} |
71 | | - tools: composer:v2 |
72 | | - extensions: sockets, curl |
| 68 | + php-version: ${{ matrix.php-version }} |
| 69 | + ini-values: error_reporting=E_ALL |
73 | 70 |
|
74 | | - - name: Check Out Code |
75 | | - uses: actions/checkout@v4 |
76 | | - with: |
77 | | - fetch-depth: 1 |
78 | | - |
79 | | - - name: Validate composer.json and composer.lock |
80 | | - run: composer validate --strict |
81 | | - |
82 | | - - name: Get Composer Cache Directory |
83 | | - id: composer-cache |
84 | | - run: | |
85 | | - echo "::set-output name=dir::$(composer config cache-files-dir)" |
| 71 | + - name: 🤖 Validate composer.json and composer.lock |
| 72 | + run: composer validate --ansi --strict |
86 | 73 |
|
87 | | - - name: Cache Composer Dependencies |
88 | | - uses: actions/cache@v3 |
| 74 | + - name: 📥 Install dependencies with composer |
| 75 | + uses: ramsey/composer-install@v3 |
89 | 76 | with: |
90 | | - path: ${{ steps.composer-cache.outputs.dir }} |
91 | | - key: php-${{ matrix.php }}-${{ matrix.os }}-composer-${{ hashFiles('**/composer.lock') }} |
92 | | - restore-keys: | |
93 | | - php-${{ matrix.php }}-${{ matrix.os }}-composer- |
94 | | -
|
95 | | - - name: Install lowest dependencies from composer.json |
96 | | - if: matrix.dependencies == 'lowest' |
97 | | - run: composer update --no-interaction --no-progress --prefer-lowest |
98 | | - |
99 | | - - name: Validate lowest dependencies |
100 | | - if: matrix.dependencies == 'lowest' |
101 | | - env: |
102 | | - COMPOSER_POOL_OPTIMIZER: 0 |
103 | | - run: vendor/bin/validate-prefer-lowest |
104 | | - |
105 | | - - name: Install highest dependencies from composer.json |
106 | | - if: matrix.dependencies == 'highest' |
107 | | - run: composer update --no-interaction --no-progress |
| 77 | + dependency-versions: ${{ matrix.dependencies }} |
108 | 78 |
|
109 | | - - name: Run tests |
110 | | - run: vendor/bin/pest --testdox |
| 79 | + - name: 🧪 Run tests |
| 80 | + run: composer test |
0 commit comments