Merge pull request #90 from MarcelWeidum/shorten-herd-command #278
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 ] | |
| jobs: | |
| tests: | |
| strategy: | |
| matrix: | |
| shard: [ 1, 2, 3, 4 ] | |
| name: Application Operational Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Start MYSQL | |
| run: | | |
| sudo systemctl enable mysql.service | |
| sudo systemctl start mysql.service | |
| mysql --host 127.0.0.1 -uroot -proot -e 'CREATE DATABASE IF NOT EXISTS laravel;' | |
| mysql --host 127.0.0.1 -uroot -proot -e "SELECT @@global.secure_file_priv, @@global.local_infile" | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.3' | |
| extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv | |
| coverage: none | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| - name: Install NodeJS dependencies | |
| run: npm ci | |
| - name: Install Playwright Browsers | |
| run: npx playwright install --with-deps | |
| - name: Install Composer dependencies | |
| run: composer install --no-interaction --prefer-dist --optimize-autoloader | |
| - name: Prepare Application | |
| run: | | |
| php artisan config:clear | |
| cp .env.example .env | |
| php artisan key:generate | |
| php artisan storage:link | |
| npm run build | |
| - name: Migrations | |
| run: php artisan migrate --force -v | |
| - name: Tests (Shard ${{ matrix.shard }}/4) | |
| run: php artisan test --shard ${{ matrix.shard }}/4 --ci -p |