Create tests.yml

This commit is contained in:
Denis Duliçi 2019-11-18 13:50:47 +03:00 committed by GitHub
parent 1e83b4d105
commit 22a02c27d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

22
.github/workflows/tests.yml vendored Normal file
View File

@ -0,0 +1,22 @@
name: PHPUnit Tests
on: [push]
jobs:
phpunit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.testing', '.env');"
- name: Install composer
run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
- name: Create Database
run: |
mkdir -p database
touch database/database.sqlite
- name: Execute tests
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: vendor/bin/phpunit