Update BlockBots.php #36
This file contains hidden or 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] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| phpunit-tests: | |
| runs-on: ubuntu-latest | |
| services: | |
| redis: | |
| image: redis:5.0.5-alpine | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| strategy: | |
| matrix: | |
| php: ['8.2', '8.3', '8.4'] | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Update PHP version in Dockerfile | |
| run: sed -i "s/FROM php:8.2-cli/FROM php:${{ matrix.php }}-cli/" Dockerfile | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build container | |
| run: docker compose build | |
| - name: Install dependencies | |
| run: docker compose run --rm laravel_block_bots composer install | |
| - name: Run tests | |
| run: docker compose run --rm laravel_block_bots composer run test |