|
1 | 1 | name: run-tests
|
2 | 2 |
|
3 |
| -on: [push, pull_request] |
| 3 | +on: |
| 4 | + push: |
| 5 | + paths: |
| 6 | + - '**.php' |
| 7 | + - '.github/workflows/run-tests.yml' |
| 8 | + - 'phpunit.xml.dist' |
| 9 | + - 'composer.json' |
| 10 | + - 'composer.lock' |
4 | 11 |
|
5 | 12 | jobs:
|
6 |
| - tests: |
| 13 | + test: |
7 | 14 | runs-on: ${{ matrix.os }}
|
| 15 | + timeout-minutes: 5 |
8 | 16 | strategy:
|
9 | 17 | fail-fast: false
|
10 | 18 | matrix:
|
11 | 19 | os: [ubuntu-latest]
|
12 | 20 | php: [8.3, 8.2, 8.1]
|
13 |
| - laravel: [10.*, 11.*] |
14 |
| - dependency-version: [prefer-stable] |
| 21 | + laravel: [11.*, 10.*] |
| 22 | + stability: [prefer-lowest, prefer-stable] |
| 23 | + carbon: [^2.63] |
15 | 24 | include:
|
16 |
| - - laravel: 10.* |
17 |
| - testbench: 8.* |
18 |
| - - laravel: 11.* |
19 |
| - testbench: 9.* |
| 25 | + - laravel: 10.* |
| 26 | + testbench: 8.* |
| 27 | + - laravel: 11.* |
| 28 | + testbench: 9.* |
20 | 29 | exclude:
|
21 |
| - - laravel: 11.* |
22 |
| - php: 8.1 |
| 30 | + - laravel: 11.* |
| 31 | + php: 8.1 |
23 | 32 |
|
24 |
| - name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} |
| 33 | + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} |
25 | 34 |
|
26 | 35 | steps:
|
27 |
| - - name: Checkout code |
28 |
| - uses: actions/checkout@v4 |
29 |
| - |
30 |
| - - name: Install SQLite 3 |
31 |
| - run: | |
32 |
| - sudo apt-get update |
33 |
| - sudo apt-get install sqlite3 |
34 |
| -
|
35 |
| - - name: Setup PHP |
36 |
| - uses: shivammathur/setup-php@v2 |
37 |
| - with: |
38 |
| - php-version: ${{ matrix.php }} |
39 |
| - extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv |
40 |
| - coverage: none |
41 |
| - |
42 |
| - - name: Install dependencies |
43 |
| - run: | |
44 |
| - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:>=2.62.1" --no-interaction --no-update |
45 |
| - composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction |
46 |
| -
|
47 |
| - - name: Setup Problem Matches |
48 |
| - run: | |
49 |
| - echo "::add-matcher::${{ runner.tool_cache }}/php.json" |
50 |
| - echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" |
51 |
| -
|
52 |
| - - name: Execute tests |
53 |
| - run: vendor/bin/pest |
| 36 | + - name: Checkout code |
| 37 | + uses: actions/checkout@v4 |
| 38 | + |
| 39 | + - name: Install SQLite 3 |
| 40 | + run: | |
| 41 | + sudo apt-get update |
| 42 | + sudo apt-get install sqlite3 |
| 43 | +
|
| 44 | + - name: Setup PHP |
| 45 | + uses: shivammathur/setup-php@v2 |
| 46 | + with: |
| 47 | + php-version: ${{ matrix.php }} |
| 48 | + extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv |
| 49 | + coverage: none |
| 50 | + |
| 51 | + - name: Setup problem matchers |
| 52 | + run: | |
| 53 | + echo "::add-matcher::${{ runner.tool_cache }}/php.json" |
| 54 | + echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" |
| 55 | +
|
| 56 | + - name: Install dependencies |
| 57 | + run: | |
| 58 | + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.os == 'windows-latest' && '^^^' || '' }}${{ matrix.carbon }}" --no-interaction --no-update |
| 59 | + composer update --${{ matrix.stability }} --prefer-dist --no-interaction |
| 60 | +
|
| 61 | + - name: List Installed Dependencies |
| 62 | + run: composer show -D |
| 63 | + |
| 64 | + - name: Execute tests |
| 65 | + run: vendor/bin/pest --ci |
| 66 | + |
| 67 | + |
| 68 | + |
0 commit comments