-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
37 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,52 @@ | ||
name: run-tests | ||
name: Tests | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
run: | ||
runs-on: 'ubuntu-latest' | ||
strategy: | ||
fail-fast: true | ||
fail-fast: false | ||
matrix: | ||
php: ['8.2','8.3'] | ||
php: ['8.1', '8.2','8.3'] | ||
os: [ubuntu-latest] | ||
stability: [prefer-stable] | ||
laravel: [10.*, 11.*] | ||
laravel: [9.*, 10.*, 11.*] | ||
include: | ||
- laravel: 9.* | ||
testbench: 7.* | ||
- laravel: 10.* | ||
testbench: 7.* | ||
- laravel: 11.* | ||
testbench: 7.* | ||
|
||
|
||
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} | ||
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick | ||
coverage: none | ||
|
||
- name: Setup problem matchers | ||
run: | | ||
echo "::add-matcher::${{ runner.tool_cache }}/php.json" | ||
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | ||
- name: Install dependencies | ||
run: | | ||
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update | ||
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction | ||
- name: Execute tests | ||
run: vendor/bin/phpunit | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: bcmath, curl, dom, mbstring, pcntl, sockets, xml, intl | ||
coverage: none | ||
|
||
- name: Set up Docker | ||
run: | | ||
sudo rm /usr/local/bin/docker-compose | ||
curl -SL https://github.com/docker/compose/releases/download/v2.15.1/docker-compose-`uname -s`-`uname -m` > docker-compose | ||
chmod +x docker-compose | ||
sudo mv docker-compose /usr/local/bin | ||
- name: Start Docker container | ||
run: docker-compose up -d | ||
|
||
- name: Install dependencies | ||
run: | | ||
composer update --${{ matrix.stability }} --prefer-dist --no-interaction | ||
- name: Execute tests | ||
run: vendor/bin/phpunit |