fix: db collation not being taken from env for mysql #3
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: Test | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.3' | |
| extensions: bcmath, curl, gd, mbstring, mysql, openssl, pdo, tokenizer, xml, zip | |
| tools: composer:v2 | |
| coverage: none | |
| - name: Cache Composer Dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.composer/cache | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: ${{ runner.os }}-composer- | |
| - name: Create Database | |
| run: touch database/database.sqlite | |
| - name: Copy .env | |
| run: php -r "file_exists('.env') || copy('.env.example', '.env');" | |
| - name: Install Dependencies | |
| run: composer install --prefer-dist --no-progress --no-suggest | |
| - name: Generate Application Key | |
| run: php artisan key:generate --force | |
| - name: Build Assets | |
| run: | | |
| npm install | |
| npm run build | |
| - name: Run Test | |
| env: | |
| DB_CONNECTION: sqlite | |
| DB_DATABASE: database/database.sqlite | |
| run: php artisan test | |