Skip to content

Commit 118d45a

Browse files
Clean up Github Actions tests (#349)
* Clean up GH Actions
1 parent cbc439f commit 118d45a

File tree

1 file changed

+34
-18
lines changed

1 file changed

+34
-18
lines changed

.github/workflows/tests.yml

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,24 @@ jobs:
1212
strategy:
1313
fail-fast: true
1414
matrix:
15-
php: [ 7.2, 7.3, 7.4, 8.0, 8.1 ]
16-
laravel: [ ^6.0, ^7.0, ^8.74, ^9.0 ]
17-
composerFlags: ['--prefer-lowest', '']
15+
php: [ 7.2, 7.3, 7.4, '8.0', 8.1 ]
16+
laravel: [ 6, 8, 9 ]
17+
stability: ['prefer-lowest', 'prefer-stable']
1818
exclude:
1919
- php: 7.2
20-
laravel: ^8.74
20+
laravel: 8
2121
- php: 7.2
22-
laravel: ^9.0
22+
laravel: 9
2323
- php: 7.3
24-
laravel: ^9.0
24+
laravel: 9
2525
- php: 7.4
26-
laravel: ^9.0
26+
laravel: 9
2727
- php: 8.1
28-
laravel: ^6.0
28+
laravel: 6
2929
- php: 8.1
30-
laravel: ^7.0
30+
laravel: 7
3131

32-
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} ${{ matrix.composerFlags }}
32+
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} (w/ ${{ matrix.stability }})
3333
steps:
3434
- name: Checkout code
3535
uses: actions/checkout@v2
@@ -39,17 +39,33 @@ jobs:
3939
with:
4040
php-version: ${{ matrix.php }}
4141
extensions: dom, curl, libxml, mbstring, zip
42+
ini-values: error_reporting=E_ALL
4243
tools: composer:v2
4344
coverage: none
44-
45-
- name: Install dependencies
46-
run: |
47-
composer require "laravel/framework=${{ matrix.laravel }}" --no-update
48-
composer update --prefer-dist --no-interaction --no-progress ${{ matrix.composerFlags }}
49-
45+
5046
- name: Set Minimum PHP 8.1 Versions
51-
run: composer require phpunit/phpunit:^9.5.8 --dev --with-all-dependencies --prefer-dist --no-interaction --no-progress --prefer-lowest
52-
if: matrix.php == 8.1 && matrix.composerFlags == '--prefer-lowest'
47+
uses: nick-invision/retry@v1
48+
with:
49+
timeout_minutes: 5
50+
max_attempts: 5
51+
command: |
52+
composer require phpunit/phpunit:^9.5.8 --dev --${{ matrix.stability }} --no-update --no-interaction
53+
composer require vlucas/phpdotenv:^5.3.1 --${{ matrix.stability }} --no-update --no-interaction
54+
if: matrix.php >= 8.1 && matrix.stability == 'prefer-lowest'
55+
56+
- name: Set Laravel version
57+
uses: nick-invision/retry@v1
58+
with:
59+
timeout_minutes: 5
60+
max_attempts: 5
61+
command: composer require "laravel/framework=^${{ matrix.laravel }}" --no-interaction --no-update
62+
63+
- name: Install dependencies
64+
uses: nick-invision/retry@v1
65+
with:
66+
timeout_minutes: 5
67+
max_attempts: 5
68+
command: composer update --${{ matrix.stability }} --no-interaction
5369

5470
- name: Execute tests
5571
run: vendor/bin/phpunit --verbose

0 commit comments

Comments
 (0)