Skip to content

Commit

Permalink
build: update test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasonej committed Mar 8, 2024
1 parent 1f6f319 commit e48b75c
Showing 1 changed file with 16 additions and 21 deletions.
37 changes: 16 additions & 21 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,37 @@ jobs:
matrix:
php: [8.2, 8.3]
laravel: [10.0, 11.0]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 10.0
testbench: 8.0
- laravel: 11.x-dev
testbench: 9.x-dev
stability: ["--prefer-lowest", "--prefer-stable"]
name: PHP ${{ matrix.php }} - Laravel v${{ matrix.laravel }} - ${{ matrix.stability }}
steps:
- name: Checkout code
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, gd
coverage: none

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache Dependencies
uses: actions/cache@v2
- name: Cache composer dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-php-${{ matrix.php }}-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.strategy }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, gd
coverage: none
${{ runner.os }}-${{ matrix.php }}-${{ matrix.strategy }}-composer-
- name: Install dependencies
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-suggest
run: composer update ${{ matrix.stability }} --prefer-dist --no-interaction --no-suggest

- name: Require specific versions of packages
run: composer update laravel/framework:^${{ matrix.laravel }} orchestra/testbench:^${{ matrix.testbench }} -W
run: composer update laravel/framework:^${{ matrix.laravel }} -W

- name: Execute tests
run: vendor/bin/phpunit

0 comments on commit e48b75c

Please sign in to comment.