Tests #1768
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: | |
pull_request: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
php: ['8.1', '8.2', '8.3'] | |
stability: ['prefer-lowest', 'prefer-stable'] | |
laravel: ['^10.0', '^11.0'] | |
exclude: | |
- php: '8.1' | |
laravel: '^11.0' | |
name: 'PHP ${{ matrix.php }} - Laravel: ${{matrix.laravel}} - ${{ matrix.stability }}' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: dom, curl, libxml, mbstring, zip | |
coverage: none | |
- name: Set up Docker | |
run: | | |
sudo rm /usr/local/bin/docker-compose | |
curl -L https://github.com/docker/compose/releases/download/1.24.1/docker-compose-`uname -s`-`uname -m` > docker-compose | |
chmod +x docker-compose | |
sudo mv docker-compose /usr/local/bin | |
- name: Start Docker container | |
run: docker-compose up -d rabbitmq | |
- name: Install dependencies | |
run: composer update --with='laravel/framework:${{matrix.laravel}}' --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress | |
- name: Run Laravel Pint | |
run: ./vendor/bin/pint --test | |
- name: Execute tests | |
run: sleep 10 && vendor/bin/phpunit |