|
1 | 1 | name: run-tests
|
2 | 2 |
|
3 |
| -on: [pull_request] |
| 3 | +on: |
| 4 | + - pull_request |
4 | 5 |
|
5 | 6 | jobs:
|
6 |
| - test: |
7 |
| - if: "!contains(github.event.commits[0].message, '[skip ci]')" |
8 |
| - runs-on: ubuntu-latest |
9 |
| - strategy: |
10 |
| - fail-fast: true |
11 |
| - matrix: |
12 |
| - php: [8.3] |
13 |
| - laravel: [11.*] |
14 |
| - include: |
15 |
| - - laravel: 11.* |
16 |
| - testbench: 9.* |
17 |
| - name: PHP ${{ matrix.php }} - LARAVEL ${{ matrix.laravel }} |
18 |
| - steps: |
19 |
| - - name: Checkout code |
20 |
| - uses: actions/checkout@v2 |
21 |
| - |
22 |
| - - name: Decrypt services-account.json |
23 |
| - run: | |
24 |
| - gpg --quiet --batch --yes --decrypt --passphrase="$GOOGLE_SERVICES_SECRET" \ |
25 |
| - --output $GITHUB_WORKSPACE/tests/fixtures/service-account.json $GITHUB_WORKSPACE/tests/fixtures/service-account.json.gpg |
26 |
| - env: |
27 |
| - GOOGLE_SERVICES_SECRET: ${{ secrets.GOOGLE_SERVICES_SECRET }} |
28 |
| - |
29 |
| - - name: Cache dependencies |
30 |
| - uses: actions/cache@v1 |
31 |
| - with: |
32 |
| - path: ~/.composer/cache/files |
33 |
| - key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} |
34 |
| - |
35 |
| - - name: Setup PHP |
36 |
| - uses: shivammathur/setup-php@v2 |
37 |
| - with: |
38 |
| - php-version: ${{ matrix.php }} |
39 |
| - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick |
40 |
| - coverage: none |
41 |
| - |
42 |
| - - name: Install dependencies |
43 |
| - run: | |
44 |
| - composer require "illuminate/console:${{ matrix.laravel }}" "illuminate/filesystem:${{ matrix.laravel }}" "illuminate/support:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update |
45 |
| - composer update --prefer-dist --no-interaction --no-suggest |
46 |
| -
|
47 |
| - - name: Run Tests |
48 |
| - run: vendor/bin/phpunit |
| 7 | + test: |
| 8 | + if: "!contains(github.event.commits[0].message, '[skip ci]')" |
| 9 | + |
| 10 | + runs-on: ubuntu-latest |
| 11 | + |
| 12 | + strategy: |
| 13 | + fail-fast: true |
| 14 | + matrix: |
| 15 | + php: ['8.2', 8.3, '8.3', '8.4'] |
| 16 | + laravel: ['11.*', '12.*'] |
| 17 | + include: |
| 18 | + - laravel: 11.* |
| 19 | + testbench: 9.* |
| 20 | + - laravel: 12.* |
| 21 | + testbench: 10.* |
| 22 | + |
| 23 | + name: PHP ${{ matrix.php }} - LARAVEL ${{ matrix.laravel }} |
| 24 | + |
| 25 | + steps: |
| 26 | + - name: Checkout code |
| 27 | + uses: actions/checkout@v2 |
| 28 | + |
| 29 | + - name: Decrypt services-account.json |
| 30 | + run: | |
| 31 | + gpg --quiet --batch --yes --decrypt --passphrase="$GOOGLE_SERVICES_SECRET" \ |
| 32 | + --output $GITHUB_WORKSPACE/tests/fixtures/service-account.json $GITHUB_WORKSPACE/tests/fixtures/service-account.json.gpg |
| 33 | + env: |
| 34 | + GOOGLE_SERVICES_SECRET: ${{ secrets.GOOGLE_SERVICES_SECRET }} |
| 35 | + |
| 36 | + - name: Cache dependencies |
| 37 | + uses: actions/cache@v1 |
| 38 | + with: |
| 39 | + path: ~/.composer/cache/files |
| 40 | + key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} |
| 41 | + |
| 42 | + - name: Setup PHP |
| 43 | + uses: shivammathur/setup-php@v2 |
| 44 | + with: |
| 45 | + php-version: ${{ matrix.php }} |
| 46 | + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick |
| 47 | + coverage: none |
| 48 | + |
| 49 | + - name: Install dependencies |
| 50 | + run: | |
| 51 | + composer require "illuminate/console:${{ matrix.laravel }}" "illuminate/filesystem:${{ matrix.laravel }}" "illuminate/support:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update |
| 52 | + composer update --prefer-dist --no-interaction --no-suggest |
| 53 | +
|
| 54 | + - name: Run Tests |
| 55 | + run: vendor/bin/phpunit |
0 commit comments