Skip to content

Commit

Permalink
Merge pull request #9 from cashier-provider/2.x
Browse files Browse the repository at this point in the history
Updated GitHub Actions rules
  • Loading branch information
Andrey Helldar authored Nov 29, 2021
2 parents 93fd1f5 + 398d403 commit 283e4fc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: phpunit
name: "Laravel 6-8"
on: [ push ]

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

strategy:
fail-fast: true
Expand Down
38 changes: 18 additions & 20 deletions .github/workflows/coverage.yml → .github/workflows/laravel-8.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
name: coverage
on:
push:
branches:
- main
- coverage
name: "Laravel 8"
on: [ push ]

jobs:
scrutinizer:
runs-on: ubuntu-20.04
build:
runs-on: ubuntu-latest

name: Coverage
strategy:
fail-fast: true
matrix:
php: [ "7.3", "7.4", "8.0", "8.1" ]
laravel: [ "8.0" ]

name: PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }}

services:
mysql:
Expand All @@ -28,24 +30,20 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
php-version: ${{ matrix.php }}
extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv, bcmath
coverage: xdebug
coverage: none

- name: Store environment variables
run: |
echo "CASHIER_TINKOFF_QR_CLIENT_ID=${{ secrets.CASHIER_TINKOFF_QR_CLIENT_ID }}" >> .env
echo "CASHIER_TINKOFF_QR_CLIENT_SECRET=${{ secrets.CASHIER_TINKOFF_QR_CLIENT_SECRET }}" >> .env
- name: Install dependencies
run: composer update --prefer-stable --prefer-dist --no-progress --no-interaction
run: composer require laravel/framework:^${{ matrix.laravel }} --prefer-stable --prefer-dist --no-progress --no-interaction

- name: Execute tests
run: |
mkdir -p build/logs
sudo vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
- name: Export
run: |
wget https://scrutinizer-ci.com/ocular.phar
sudo php ocular.phar code-coverage:upload --format=php-clover coverage.clover
run: sudo vendor/bin/phpunit
env:
MYSQL_HOST: 127.0.0.1
PGSQL_HOST: 127.0.0.1

0 comments on commit 283e4fc

Please sign in to comment.