From 58a63fb3ba5df927cf24a5d20cea4e47be960b79 Mon Sep 17 00:00:00 2001 From: Abrar Ahmad Date: Mon, 22 Aug 2022 13:50:39 +0500 Subject: [PATCH] tests above services --- .github/workflows/ci.yml | 68 ++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 027aac03..5c565ddc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,40 @@ jobs: matrix: laravel: ['^8.0', '^9.0'] + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Get composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache composer dependencies + uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-${{ matrix.laravel }}-${{ hashFiles('**/composer.lock') }} + + - name: Install Composer dependencies + run: | + composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update + composer update --prefer-dist --no-interaction + - name: Run tests + run: composer test + env: + DB_PASSWORD: password + DB_USERNAME: root + DB_DATABASE: main + TENANCY_TEST_MYSQL_HOST: mysql + TENANCY_TEST_PGSQL_HOST: postgres + TENANCY_TEST_REDIS_HOST: redis + TENANCY_TEST_SQLSRV_HOST: mssql + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v2 + with: + token: 24382d15-84e7-4a55-bea4-c4df96a24a9b + services: postgres: image: postgres:latest @@ -63,40 +97,6 @@ jobs: - 6379/tcp options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3 - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Cache composer dependencies - uses: actions/cache@v2 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-${{ matrix.laravel }}-${{ hashFiles('**/composer.lock') }} - - - name: Install Composer dependencies - run: | - composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update - composer update --prefer-dist --no-interaction - - name: Run tests - run: composer test - env: - DB_PASSWORD: password - DB_USERNAME: root - DB_DATABASE: main - TENANCY_TEST_MYSQL_HOST: mysql - TENANCY_TEST_PGSQL_HOST: postgres - TENANCY_TEST_REDIS_HOST: redis - TENANCY_TEST_SQLSRV_HOST: mssql - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v2 - with: - token: 24382d15-84e7-4a55-bea4-c4df96a24a9b - php-cs-fixer: name: Code style (php-cs-fixer) runs-on: ubuntu-latest