Updates for initial database state #484
Workflow file for this run
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"] | |
jobs: | |
run-tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ubuntu-latest] | |
php: [8.2, 8.3] | |
laravel: [11] | |
services: | |
mysql: | |
image: mysql:8.0 | |
env: | |
MYSQL_DATABASE: test | |
MYSQL_ROOT_PASSWORD: password | |
ports: | |
- 3306:3306 | |
options: >- | |
--health-cmd="mysqladmin ping" | |
--health-interval=10s | |
--health-timeout=5s | |
--health-retries=3 | |
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.os }} | |
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, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo | |
coverage: none | |
- name: Install dependencies | |
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
- name: Copy .env | |
run: | | |
cp .env.ci .env | |
cp .env.ci .env.testing | |
- name: Generate keys | |
run: | | |
php artisan key:generate | |
php artisan key:generate --env=testing | |
- name: Directory permissions | |
run: chmod -R 777 storage nova/bootstrap/cache | |
- name: Run testsuite | |
run: | | |
php artisan migrate | |
./vendor/bin/pest --parallel | |
- name: Deploy to Forge | |
if: github.ref == 'refs/heads/dev' | |
run: curl "${{ secrets.FORGE_DEPLOYMENT_WEBHOOK }}" |