Skip to content

Commit

Permalink
Use MySQL for tests in CI (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdubz authored Nov 11, 2021
1 parent 6bc18c4 commit 0e8eba8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .env.ci
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ APP_URL=http://localhost
LOG_CHANNEL=stack
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
ELASTIC_HOST=localhost:9200
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: mirromutth/[email protected]
with:
mysql database: kcal
mysql root password: root
- uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
Expand Down Expand Up @@ -41,7 +45,7 @@ jobs:
php -r "file_exists('.env') || copy('.env.ci', '.env');"
php artisan key:generate
- 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
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 0e8eba8

Please sign in to comment.