|
1 | | -name: run-tests |
| 1 | +name: Tests |
2 | 2 |
|
3 | | -on: [push, pull_request] |
| 3 | +on: |
| 4 | + push: |
| 5 | + pull_request: |
4 | 6 |
|
5 | 7 | jobs: |
6 | | - test: |
7 | | - runs-on: ${{ matrix.os }} |
| 8 | + run: |
| 9 | + runs-on: 'ubuntu-latest' |
8 | 10 | strategy: |
9 | | - fail-fast: true |
| 11 | + fail-fast: false |
10 | 12 | matrix: |
11 | | - php: ['8.2','8.3'] |
| 13 | + php: ['8.1', '8.2','8.3'] |
12 | 14 | os: [ubuntu-latest] |
13 | 15 | stability: [prefer-stable] |
14 | | - laravel: [10.*, 11.*] |
| 16 | + laravel: [9.*, 10.*, 11.*] |
15 | 17 | include: |
| 18 | + - laravel: 9.* |
| 19 | + testbench: 7.* |
16 | 20 | - laravel: 10.* |
17 | 21 | testbench: 7.* |
18 | 22 | - laravel: 11.* |
19 | 23 | testbench: 7.* |
20 | 24 |
|
21 | | - |
22 | | - name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} |
| 25 | + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} |
23 | 26 |
|
24 | 27 | steps: |
25 | | - - name: Checkout code |
26 | | - uses: actions/checkout@v2 |
27 | | - |
28 | | - - name: Setup PHP |
29 | | - uses: shivammathur/setup-php@v2 |
30 | | - with: |
31 | | - php-version: ${{ matrix.php }} |
32 | | - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick |
33 | | - coverage: none |
34 | | - |
35 | | - - name: Setup problem matchers |
36 | | - run: | |
37 | | - echo "::add-matcher::${{ runner.tool_cache }}/php.json" |
38 | | - echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" |
39 | | - - name: Install dependencies |
40 | | - run: | |
41 | | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update |
42 | | - composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction |
43 | | - - name: Execute tests |
44 | | - run: vendor/bin/phpunit |
| 28 | + - name: Checkout code |
| 29 | + uses: actions/checkout@v3 |
| 30 | + |
| 31 | + - name: Setup PHP |
| 32 | + uses: shivammathur/setup-php@v2 |
| 33 | + with: |
| 34 | + php-version: ${{ matrix.php }} |
| 35 | + extensions: bcmath, curl, dom, mbstring, pcntl, sockets, xml, intl |
| 36 | + coverage: none |
| 37 | + |
| 38 | + - name: Set up Docker |
| 39 | + run: | |
| 40 | + sudo rm /usr/local/bin/docker-compose |
| 41 | + curl -SL https://github.com/docker/compose/releases/download/v2.15.1/docker-compose-`uname -s`-`uname -m` > docker-compose |
| 42 | + chmod +x docker-compose |
| 43 | + sudo mv docker-compose /usr/local/bin |
| 44 | + - name: Start Docker container |
| 45 | + run: docker-compose up -d |
| 46 | + |
| 47 | + - name: Install dependencies |
| 48 | + run: | |
| 49 | + composer update --${{ matrix.stability }} --prefer-dist --no-interaction |
| 50 | +
|
| 51 | + - name: Execute tests |
| 52 | + run: vendor/bin/phpunit |
0 commit comments