Fix documentation #2157
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: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
- "9.0" | |
jobs: | |
# Unit tests back (phpunit) | |
laravel-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- php: 8.2 | |
env: | |
LARAVEL: 11.* | |
TESTBENCH: 9.* | |
- php: 8.3 | |
env: | |
LARAVEL: 11.* | |
TESTBENCH: 9.* | |
- php: 8.4 | |
env: | |
LARAVEL: 11.* | |
TESTBENCH: 9.* | |
env: ${{ matrix.env }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: mbstring, dom, fileinfo, mysql | |
- name: Setup locales | |
run: sudo locale-gen fr_FR.UTF-8 | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache composer dependencies | |
uses: actions/cache@v1 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install Composer dependencies | |
run: | | |
composer require "laravel/framework:${LARAVEL}" "orchestra/testbench:${TESTBENCH}" --no-interaction --no-update | |
composer update --prefer-stable --prefer-dist --no-interaction | |
- name: Execute tests via Pest | |
run: ./vendor/bin/pest --parallel | |
slack: | |
needs: | |
- laravel-tests | |
# - e2e-tests | |
if: failure() && github.event_name == 'push' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: 8398a7/[email protected] | |
with: | |
status: failure | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |