Tests #1294
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.0', '8.1', '8.2'] | |
stability: ['prefer-lowest', prefer-stable] | |
laravel: ['^9.0', '^10.0'] | |
exclude: | |
- php: '8.0' | |
laravel: '^10.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 --verbose |