Add Laravel Octane #103
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: tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
linux_tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
php: [ 8.2, 8.1 ] | |
stability: [ prefer-lowest, prefer-stable ] | |
name: PHP ${{ matrix.php }} - ${{ matrix.stability }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
tools: composer:v2 | |
coverage: xdebug | |
- name: Install dependencies | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 5 | |
command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress | |
- name: Execute phpcs | |
run: php vendor/bin/phpcs | |
- name: Initial Key | |
run: cp .env.example .env && php artisan key:generate | |
- name: Migration | |
run: touch database/database.sqlite && php artisan migrate:fresh --seed | |
- name: Execute tests | |
run: php -d xdebug.mode=coverage vendor/bin/phpunit | |
- name: Code coverage | |
if: ${{ matrix.php == '8.1' && matrix.stability == 'prefer-stable' }} | |
uses: codecov/codecov-action@v3 | |
with: | |
files: ./build/coverage/clover.xml |