diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 000000000..a98b22183 --- /dev/null +++ b/.github/workflows/tests.yml @@ -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