Skip to content

Commit

Permalink
Add github actions CI config
Browse files Browse the repository at this point in the history
  • Loading branch information
ycs77 committed Nov 2, 2023
1 parent 7e5e13e commit df8436d
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 7 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: tests

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.1, 8.2]
laravel: [9.*, 10.*]

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

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, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, intl, gd, exif, iconv, imagick, fileinfo
coverage: none

- name: Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --prefer-stable --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/pest
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"require-dev": {
"mockery/mockery": "^1.4",
"orchestra/testbench": ">=7.0",
"pestphp/pest": "^2.6"
"pestphp/pest": "^1.23 || ^2.6"
},
"autoload": {
"psr-4": {
Expand Down
6 changes: 0 additions & 6 deletions tests/Unit/Results/QueryResultTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,3 @@
expect($credit->authBank())->toBe('CTBC');
expect($credit->authBankName())->toBe('中國信託銀行');
});

test('can be get result data for payment status')->todo();

test('can be get result data for lgs')->todo();

test('can be get result data for digital wallet')->todo();

0 comments on commit df8436d

Please sign in to comment.