Add reproducer and sample-request issue templates with README guidance #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: ci | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| name: php artisan test (php ${{ matrix.php }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: ['8.4', '8.5'] | |
| services: | |
| mysql: | |
| image: mysql:8.0 | |
| env: | |
| MYSQL_ROOT_PASSWORD: secret | |
| MYSQL_DATABASE: sample | |
| MYSQL_USER: laravel | |
| MYSQL_PASSWORD: password | |
| ports: | |
| - 3306:3306 | |
| options: >- | |
| --health-cmd="mysqladmin ping -h 127.0.0.1 -u root --password=secret" | |
| --health-interval=5s | |
| --health-timeout=5s | |
| --health-retries=20 | |
| redis: | |
| image: redis:7-alpine | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd="redis-cli ping" | |
| --health-interval=3s | |
| --health-timeout=3s | |
| --health-retries=10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: mbstring, intl, pdo_mysql, redis, bcmath, gd, zip | |
| coverage: none | |
| tools: composer:v2 | |
| - name: Validate composer.json | |
| run: composer validate --strict | |
| - name: Cache Composer packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: vendor | |
| key: ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-php-${{ matrix.php }}- | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress --no-interaction | |
| - name: Prepare environment file | |
| run: cp .env.example .env | |
| - name: Generate application key | |
| run: php artisan key:generate | |
| - name: Run test suite | |
| env: | |
| DB_CONNECTION: mysql | |
| DB_HOST: 127.0.0.1 | |
| DB_PORT: 3306 | |
| DB_DATABASE: sample | |
| DB_USERNAME: laravel | |
| DB_PASSWORD: password | |
| SHARED_DB_HOST: 127.0.0.1 | |
| SHARED_DB_PORT: 3306 | |
| SHARED_DB_DATABASE: sample | |
| SHARED_DB_USERNAME: laravel | |
| SHARED_DB_PASSWORD: password | |
| REDIS_CLIENT: phpredis | |
| REDIS_HOST: 127.0.0.1 | |
| REDIS_PORT: 6379 | |
| run: php artisan test |