Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
levizoesch committed Oct 30, 2023
1 parent 9430ae3 commit 2cd1b5a
Show file tree
Hide file tree
Showing 4 changed files with 145 additions and 9 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/laravel-10.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: run-tests-pcov-pull

on: [push]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [8.1,8.2]
laravel: [10]
stability: [prefer-dist]

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, iconv, fileinfo
tools: phpunit:latest
ini-values: memory_limit=512M
coverage: pcov
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"

- name: Get composer cache directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-PHP${{ matrix.php }}-Laravel${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-PHP${{ matrix.php }}-Laravel${{ matrix.laravel }}-composer-

- name: Add token
run: |
composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer require "laravel/framework:${{ matrix.laravel }}.*" --no-interaction --no-update

- name: Update dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer update --${{ matrix.stability }} --no-interaction

- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Publish Config
run: php vendor/bin/testbench vendor:publish --tag=teller-sdk-config

- name: Run Unit Tests
run: php ./vendor/bin/paratest --processes=4
env:
TELLER_TEST_TOKEN: ${{ secrets.TELLER_TEST_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: laravel-8-9
name: laravel-8

on: [push]

Expand All @@ -10,7 +10,7 @@ jobs:
matrix:
os: [ubuntu-latest]
php: [8.0]
laravel: [8,9]
laravel: [8]
stability: [prefer-dist]

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/laravel-9.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: laravel-9

on: [push]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [8.0]
laravel: [9]
stability: [prefer-dist]

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, iconv, fileinfo
tools: phpunit:latest
ini-values: memory_limit=512M
coverage: pcov
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"

- name: Get composer cache directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-PHP${{ matrix.php }}-Laravel${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-PHP${{ matrix.php }}-Laravel${{ matrix.laravel }}-composer-

- name: Add token
run: |
composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer require "laravel/framework:${{ matrix.laravel }}.*" --no-interaction --no-update

- name: Update dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer update --${{ matrix.stability }} --no-interaction

- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Publish Config
run: php vendor/bin/testbench vendor:publish --tag=teller-sdk-config

- name: Run Unit Tests
run: php ./vendor/bin/phpunit -c phpunit.xml
env:
TELLER_TEST_TOKEN: ${{ secrets.TELLER_TEST_TOKEN }}
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ An open source PHP SDK to interact with Teller.io on the Laravel framework.

#### If you can help make this package stable for Laravel 6 & 7 please submit a PR.

| Laravel | TellerSDK | PHP Version |
|:--------|:----------|:------------|
| 10.x | 2.x | 8.1 |
| 9.x | 2.x | 8.0 - 8.1 |
| 8.x | 2.x | 7.3 - 8.1 |
| 7.x | Unknown | 7.2 - 8.0 |
| 6.x | Unknown | 7.2 - 8.0 |
| Laravel | TellerSDK | PHP Version | Tests |
|:--------|:----------|:------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 10.x | 2.x | 8.1 | [![Tests](https://github.com/levizoesch/tellersdk/actions/workflows/laravel-10.yml/badge.svg)](https://github.com/levizoesch/tellersdk/actions/workflows/laravel-10.yml) |
| 9.x | 2.x | 8.0 - 8.1 | [![Tests](https://github.com/levizoesch/tellersdk/actions/workflows/laravel-9.yml/badge.svg)](https://github.com/levizoesch/tellersdk/actions/workflows/laravel-9.yml) |
| 8.x | 2.x | 7.3 - 8.1 | [![Tests](https://github.com/levizoesch/tellersdk/actions/workflows/laravel-8.yml/badge.svg)](https://github.com/levizoesch/tellersdk/actions/workflows/laravel-8.yml) |
| 7.x | Unknown | 7.2 - 8.0 | Missing |
| 6.x | Unknown | 7.2 - 8.0 | Missing |

---

Expand Down

0 comments on commit 2cd1b5a

Please sign in to comment.