Use MySQL for tests in CI (#40)

This commit is contained in:
Christopher Charbonneau Wells 2021-11-10 16:13:28 -08:00 committed by GitHub
parent 6bc18c48a8
commit 0e8eba8b91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View File

@ -7,7 +7,12 @@ APP_URL=http://localhost
LOG_CHANNEL=stack LOG_CHANNEL=stack
LOG_LEVEL=debug LOG_LEVEL=debug
DB_CONNECTION=sqlite DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=kcal
DB_USERNAME=root
DB_PASSWORD=root
SCOUT_DRIVER=elastic SCOUT_DRIVER=elastic
ELASTIC_HOST=localhost:9200 ELASTIC_HOST=localhost:9200

View File

@ -10,6 +10,10 @@ jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: mirromutth/mysql-action@v1.1
with:
mysql database: kcal
mysql root password: root
- uses: shivammathur/setup-php@v2 - uses: shivammathur/setup-php@v2
with: with:
php-version: '8.0' php-version: '8.0'
@ -41,7 +45,7 @@ jobs:
php -r "file_exists('.env') || copy('.env.ci', '.env');" php -r "file_exists('.env') || copy('.env.ci', '.env');"
php artisan key:generate php artisan key:generate
- name: Run tests - name: Run tests
run: vendor/bin/paratest --coverage-clover build/logs/clover.xml run: php artisan test --parallel --recreate-databases --coverage-clover build/logs/clover.xml
- name: Upload coverage results to Coveralls - name: Upload coverage results to Coveralls
env: env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}