wip #10
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: | |
pull_request | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
env: | |
DB_NAME: tests | |
services: | |
mysql: | |
image: mysql:8.0 | |
ports: | |
- 3306:3306 | |
env: | |
MYSQL_ALLOW_EMPTY_PASSWORD: yes | |
MYSQL_DATABASE: ${{ env.DB_NAME }} | |
redis: | |
image: redis:7.4 | |
ports: | |
- 6379:6379 | |
steps: | |
- name: Checkout Code | |
uses: actions/[email protected] | |
- name: Setup PHP and Composer | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.3' | |
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, gd, redis, igbinary, msgpack, lzf, zstd, lz4, memcached, gmp, :php-psr | |
tools: composer:v2 | |
- name: Install Dependencies | |
run: composer install -q --no-interaction | |
- name: Prep Application | |
run: | | |
cp .env.example .env | |
php artisan key:generate | |
- name: Run Tests | |
env: | |
DB_CONNECTION: mysql | |
DB_DATABASE: ${{ env.DB_NAME }} | |
DB_USERNAME: root | |
run: php artisan test --compact |