From 625aceefbfa9980890ea9524967617e727d0ffb2 Mon Sep 17 00:00:00 2001 From: Andrey Helldar Date: Wed, 8 Dec 2021 19:14:01 +0300 Subject: [PATCH 1/2] Split GitHub Actions --- .../{laravel-6.0-8.0.yml => laravel-6.yml} | 4 +- .github/workflows/laravel-7.yml | 49 +++++++++++++++++++ 2 files changed, 51 insertions(+), 2 deletions(-) rename .github/workflows/{laravel-6.0-8.0.yml => laravel-6.yml} (95%) create mode 100644 .github/workflows/laravel-7.yml diff --git a/.github/workflows/laravel-6.0-8.0.yml b/.github/workflows/laravel-6.yml similarity index 95% rename from .github/workflows/laravel-6.0-8.0.yml rename to .github/workflows/laravel-6.yml index 85ee72c..89d8308 100644 --- a/.github/workflows/laravel-6.0-8.0.yml +++ b/.github/workflows/laravel-6.yml @@ -1,4 +1,4 @@ -name: "Laravel 6-8" +name: "Laravel 6" on: [ push ] jobs: @@ -9,7 +9,7 @@ jobs: fail-fast: true matrix: php: [ "7.3", "7.4", "8.0" ] - laravel: [ "6.0", "7.0", "8.0" ] + laravel: [ "6.0" ] name: PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }} diff --git a/.github/workflows/laravel-7.yml b/.github/workflows/laravel-7.yml new file mode 100644 index 0000000..fbfb364 --- /dev/null +++ b/.github/workflows/laravel-7.yml @@ -0,0 +1,49 @@ +name: "Laravel 7" +on: [ push ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + fail-fast: true + matrix: + php: [ "7.3", "7.4", "8.0" ] + laravel: [ "7.0" ] + + name: PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }} + + services: + mysql: + image: mysql:5.7 + env: + MYSQL_ROOT_PASSWORD: root + MYSQL_DATABASE: default + ports: + - 3306:3306 + options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv, bcmath + coverage: none + + - name: Store environment variables + run: | + echo "CASHIER_TINKOFF_CLIENT_ID=${{ secrets.CASHIER_TINKOFF_CLIENT_ID }}" >> .env + echo "CASHIER_TINKOFF_CLIENT_SECRET=${{ secrets.CASHIER_TINKOFF_CLIENT_SECRET }}" >> .env + + - name: Install dependencies + run: composer require laravel/framework:^${{ matrix.laravel }} --prefer-stable --prefer-dist --no-progress --no-interaction + + - name: Execute tests + run: sudo vendor/bin/phpunit + env: + MYSQL_HOST: 127.0.0.1 + PGSQL_HOST: 127.0.0.1 From 473aad13bd1dd23163b1ee1ba4db1379c2446964 Mon Sep 17 00:00:00 2001 From: Andrey Helldar Date: Wed, 8 Dec 2021 19:14:29 +0300 Subject: [PATCH 2/2] Update names --- .github/workflows/laravel-6.yml | 2 +- .github/workflows/laravel-7.yml | 2 +- .github/workflows/laravel-8.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/laravel-6.yml b/.github/workflows/laravel-6.yml index 89d8308..ba86fb2 100644 --- a/.github/workflows/laravel-6.yml +++ b/.github/workflows/laravel-6.yml @@ -11,7 +11,7 @@ jobs: php: [ "7.3", "7.4", "8.0" ] laravel: [ "6.0" ] - name: PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }} + name: PHP ${{ matrix.php }} services: mysql: diff --git a/.github/workflows/laravel-7.yml b/.github/workflows/laravel-7.yml index fbfb364..c604c7f 100644 --- a/.github/workflows/laravel-7.yml +++ b/.github/workflows/laravel-7.yml @@ -11,7 +11,7 @@ jobs: php: [ "7.3", "7.4", "8.0" ] laravel: [ "7.0" ] - name: PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }} + name: PHP ${{ matrix.php }} services: mysql: diff --git a/.github/workflows/laravel-8.yml b/.github/workflows/laravel-8.yml index dbfdb2c..ecbdab5 100644 --- a/.github/workflows/laravel-8.yml +++ b/.github/workflows/laravel-8.yml @@ -11,7 +11,7 @@ jobs: php: [ "7.3", "7.4", "8.0", "8.1" ] laravel: [ "8.0" ] - name: PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }} + name: PHP ${{ matrix.php }} services: mysql: