Skip to content

Commit 83e4869

Browse files
committed
Update CI
1 parent 41ddaa3 commit 83e4869

File tree

1 file changed

+41
-39
lines changed

1 file changed

+41
-39
lines changed

.github/workflows/main.yml

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,43 @@
1-
name: Run Tests
2-
on: [push]
1+
name: run-tests
2+
3+
on:
4+
- push
5+
- pull_request
36

47
jobs:
5-
run:
6-
runs-on: ubuntu-latest
7-
strategy:
8-
max-parallel: 15
9-
fail-fast: false
10-
matrix:
11-
php-versions: ['7.3', '7.4']
12-
composer-flags: ['--prefer-lowest', '--prefer-stable']
13-
env:
14-
- LARAVEL_VERSION='^7.0' TESTBENCH_VERSION='^5.0'
15-
- LARAVEL_VERSION='^8.0' TESTBENCH_VERSION='^6.0'
16-
name: Test on PHP ${{ matrix.php-versions }}, Laravel ${{ matrix.laravel-versions }} and ${{ matrix.composer-flags }}
17-
steps:
18-
- name: Checkout
19-
uses: actions/checkout@master
20-
- name: Install PHP
21-
uses: shivammathur/setup-php@master
22-
with:
23-
php-version: ${{ matrix.php-versions }}
24-
- name: Check Environment
25-
run: |
26-
${{ matrix.env }}
27-
php -v
28-
composer -V
29-
php -m
30-
echo "Laravel version ${LARAVEL_VERSION}"
31-
echo "Orchestra Testbench version ${TESTBENCH_VERSION}"
32-
- name: Install Dependencies
33-
run: |
34-
${{ matrix.env }}
35-
composer config discard-changes true
36-
composer self-update
37-
composer require --dev "laravel/framework:${LARAVEL_VERSION}" --no-interaction --no-update
38-
composer require --dev "orchestra/testbench:${TESTBENCH_VERSION}" --no-interaction --no-update
39-
composer update ${{ matrix.composer-flags }} --prefer-dist --no-suggest --no-interaction
40-
- name: Run PHPUnit
41-
run: php vendor/bin/phpunit
8+
test:
9+
runs-on: ${{ matrix.os }}
10+
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
os: [ubuntu-latest]
15+
php: [8.4, 8.3, 8.2]
16+
laravel: [^12.0, ^11.0]
17+
dependency-version: [prefer-lowest, prefer-stable]
18+
include:
19+
- laravel: ^11.0
20+
testbench: ^9.0
21+
- laravel: ^12.0
22+
testbench: ^10.0
23+
24+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
25+
26+
steps:
27+
- name: Checkout code
28+
uses: actions/checkout@v4
29+
30+
- name: Setup PHP
31+
uses: shivammathur/setup-php@v2
32+
with:
33+
php-version: ${{ matrix.php }}
34+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
35+
coverage: none
36+
37+
- name: Install dependencies
38+
run: |
39+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
40+
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
41+
42+
- name: Execute tests
43+
run: vendor/bin/phpunit

0 commit comments

Comments
 (0)