tmp #311
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: | |
branches: [ main ] | |
push: | |
branches: [ main ] | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
test: | |
name: Test PHP ${{ matrix.php-version }}, Laravel ${{ matrix.laravel-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
php-version: ['7.2', '7.3', '7.4', '8.0', '8.1'] | |
laravel-version: ['5.7.*', '5.8.*', '^6.0', '^7.0', '^8.0', '^9.0'] | |
exclude: | |
- { php-version: '7.2', laravel-version: '^9.0' } | |
- { php-version: '7.2', laravel-version: '^8.0' } | |
- { php-version: '7.3', laravel-version: '^9.0' } | |
- { php-version: '7.4', laravel-version: '^9.0' } | |
- { php-version: '8.0', laravel-version: '5.7.*' } | |
- { php-version: '8.0', laravel-version: '5.8.*' } | |
- { php-version: '8.1', laravel-version: '5.7.*' } | |
- { php-version: '8.1', laravel-version: '5.8.*' } | |
- { php-version: '8.1', laravel-version: '^6.0' } | |
- { php-version: '8.1', laravel-version: '^7.0' } | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP ${{ matrix.php-version }} | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
tools: composer | |
coverage: none | |
- name: Composer self-update | |
run: composer self-update | |
- name: Install Laravel ${{ matrix.laravel-version }} | |
run: composer require laravel/framework:${{ matrix.laravel-version }} | |
- name: Install dependencies | |
run: composer update --no-interaction --prefer-dist --no-progress --ansi | |
- name: Run lint | |
run: find ./src ./tests -name "*.php" | xargs -P10 -n1 php -l | |
- name: Run static analysis | |
run: composer run test:types | |
- name: Run unit test | |
run: composer run test:unit |