v0.0.32 #76
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
name: run-tests | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ubuntu-latest] | |
php: [8.2, 8.1] | |
laravel: [10.*] | |
stability: [prefer-stable] | |
include: | |
- laravel: 10.* | |
testbench: 8.* | |
carbon: ^2.63 | |
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: curl | |
coverage: pcov | |
- name: Setup problem matchers | |
run: | | |
echo "::add-matcher::${{ runner.tool_cache }}/php.json" | |
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- name: Create .env | |
run: | | |
touch .env | |
echo SENTINEL_ENABLED=true >> .env | |
echo SENTINEL_HOST=${{ secrets.TEST_SENTINEL_HOST }} >> .env | |
echo SENTINEL_TOKEN=${{ secrets.TEST_SENTINEL_TOKEN }} >> .env | |
- name: Install dependencies | |
run: | | |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.carbon }}" --no-interaction --no-update | |
composer update --${{ matrix.stability }} --prefer-dist --no-interaction | |
- name: Execute tests | |
run: vendor/bin/pest --ci | |
- name: Execute tests with coverage | |
run: vendor/bin/pest --coverage | |
- name: Send code coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
verbose: false |