laravel 11 #12
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: run-tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| run-tests: | |
| runs-on: ubuntu-latest | |
| services: | |
| mysql: | |
| image: mysql:latest | |
| env: | |
| MYSQL_DATABASE: mixpost_auth_test | |
| MYSQL_USER: user | |
| MYSQL_PASSWORD: secret | |
| MYSQL_ROOT_PASSWORD: root | |
| ports: | |
| - 3306:3306 | |
| options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: [ 8.2, 8.3 ] | |
| laravel: [ ^10.47|^11.0 ] | |
| name: P${{ matrix.php }} - L${{ matrix.laravel }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: dom, curl, libxml, mbstring, zip, pcntl, mysql, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, redis | |
| coverage: none | |
| - name: Set Laravel version | |
| run: | | |
| sed -i 's/^10.47|^11.0/${{ matrix.laravel }}/g' composer.json | |
| - name: Install composer dependencies | |
| uses: ramsey/composer-install@v2 | |
| env: | |
| COMPOSER_ROOT_VERSION: dev-main | |
| with: | |
| composer-options: "--prefer-dist --no-interaction" | |
| - name: Execute tests | |
| run: composer test | |
| env: | |
| DB_PORT: 3306 | |
| DB_DATABASE: mixpost_auth_test | |
| DB_USERNAME: user | |
| DB_PASSWORD: secret |