Skip to content

Commit

Permalink
Merge pull request #1 from cashier-provider/1.x
Browse files Browse the repository at this point in the history
Split GitHub Actions
  • Loading branch information
Andrey Helldar authored Dec 8, 2021
2 parents c66327d + 473aad1 commit c7032fa
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Laravel 6-8"
name: "Laravel 6"
on: [ push ]

jobs:
Expand All @@ -9,9 +9,9 @@ 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 }}
name: PHP ${{ matrix.php }}

services:
mysql:
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/laravel-7.yml
Original file line number Diff line number Diff line change
@@ -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 }}

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
2 changes: 1 addition & 1 deletion .github/workflows/laravel-8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c7032fa

Please sign in to comment.