Skip to content

Commit

Permalink
Update run-tests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sertxudev committed Mar 16, 2024
1 parent 7c4ac9b commit 1a38979
Showing 1 changed file with 49 additions and 6 deletions.
55 changes: 49 additions & 6 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@ on:
- cron: '0 0 * * *'

jobs:
test:
runs-on: ${{ matrix.os }}
ubuntu:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.1]
laravel: [8, 9, 10]
php: [8.1, 8.2, 8.3]
laravel: [10, 11]
coverage-driver: [pcov]
stability: [prefer-lowest, prefer-stable]
exclude:
- laravel: '11'
php: 8.1

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
name: Ubuntu P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }}

steps:
- name: Checkout code
Expand Down Expand Up @@ -48,3 +50,44 @@ jobs:

- name: Send code coverage report to Codecov.io
uses: codecov/codecov-action@v4
windows:
runs-on: windows-latest
strategy:
fail-fast: true
matrix:
php: [8.1, 8.2, 8.3]
laravel: [10, 11]
coverage-driver: [pcov]
stability: [prefer-lowest, prefer-stable]
exclude:
- laravel: '11'
php: 8.1

name: Windows P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- 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, fileinfo
coverage: ${{ matrix.coverage-driver }}

- 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 "illuminate/contracts=${{ matrix.testbench }}.*" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/phpunit --coverage-clover=coverage.xml

- name: Send code coverage report to Codecov.io
uses: codecov/codecov-action@v4

0 comments on commit 1a38979

Please sign in to comment.