From 48ddb65b15b2d9732ddaa120a82fbd388c7adee4 Mon Sep 17 00:00:00 2001 From: Jitendra Singh <39991107+jitendra-webkul@users.noreply.github.com> Date: Tue, 21 Jan 2020 19:07:17 +0530 Subject: [PATCH] Create ci.yml --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..b16aebf16 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: Bagisto + +on: [push] + +jobs: + laravel-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Copy .env + run: php -r "file_exists('.env') || copy('.env.ci', '.env');" + - name: Install Dependencies + run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist + - name: Generate key + run: php artisan key:generate + - name: Create Database + run: | + mkdir -p database + touch database/database.sqlite + - name: Execute tests (Unit, Feature and Trigger tests) via Codeception + env: + DB_CONNECTION: sqlite + DB_DATABASE: database/database.sqlite + run: | + set -e + @php artisan migrate:fresh --env=testing + vendor/bin/codecept run unit + vendor/bin/codecept run functional + vendor/bin/codecept run trigger