Skip to content

Commit 3435b80

Browse files
committed
enhance test cases
1 parent 0900864 commit 3435b80

1 file changed

Lines changed: 7 additions & 30 deletions

File tree

.github/workflows/php-tests.yml

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: Run PHP Tests
1+
name: Run Tests
22

33
on:
44
push:
5-
branches: [ main, master ]
5+
branches: [ master ]
66
pull_request:
7-
branches: [ main, master ]
7+
branches: [ master ]
88

99
jobs:
1010
test:
@@ -17,36 +17,13 @@ jobs:
1717
steps:
1818
- uses: actions/checkout@v4
1919

20-
- name: Set up PHP ${{ matrix.php-version }}
20+
- name: Setup PHP
2121
uses: shivammathur/setup-php@v2
2222
with:
2323
php-version: ${{ matrix.php-version }}
24-
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, dom, filter, gd, iconv, json, mbstring, pdo
25-
coverage: xdebug
26-
27-
- name: Cache Composer packages
28-
id: composer-cache
29-
uses: actions/cache@v3
30-
with:
31-
path: vendor
32-
key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
33-
restore-keys: |
34-
${{ runner.os }}-php-${{ matrix.php-version }}-
3524

3625
- name: Install dependencies
37-
run: composer install --no-interaction --prefer-dist --optimize-autoloader
38-
39-
- name: Create build directory
40-
run: mkdir -p build
26+
run: composer install --no-interaction
4127

42-
- name: Run PHPUnit with coverage
43-
run: vendor/bin/phpunit --coverage-clover=build/coverage.xml --coverage-text --testdox
44-
45-
- name: Upload coverage reports to Codecov
46-
if: matrix.php-version == '8.2'
47-
uses: codecov/codecov-action@v3
48-
with:
49-
file: build/coverage.xml
50-
flags: unittests
51-
name: codecov-umbrella
52-
fail_ci_if_error: false
28+
- name: Run tests
29+
run: composer test

0 commit comments

Comments
 (0)