Skip to content

Commit 9802f04

Browse files
committed
add github workflows
1 parent f186b4b commit 9802f04

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/main.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: main
2+
on: [push, pull_request]
3+
jobs:
4+
phpunit:
5+
name: PHPUnit
6+
runs-on: ${{ matrix.operating-system }}
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
operating-system: [ubuntu-latest, windows-latest, macos-latest]
11+
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
12+
steps:
13+
- name: Setup PHP, with composer and extensions
14+
uses: shivammathur/setup-php@v2
15+
with:
16+
php-version: ${{ matrix.php-version }}
17+
extensions: bz2, curl, fileinfo, mbstring, exif, openssl, zip
18+
coverage: xdebug
19+
20+
- name: Checkout
21+
uses: actions/checkout@v5
22+
23+
- name: Install dependencies
24+
run: composer install --ansi --prefer-dist --no-interaction --no-progress
25+
26+
- name: PHPUnit Migrate Configuration
27+
if: ${{ matrix.php-version != '7.4' && matrix.php-version != '8.0'}}
28+
run: vendor/bin/phpunit --migrate-configuration
29+
30+
- name: Run PHPUnit
31+
run: vendor/bin/phpunit --testsuite UnitTest --fail-on-warning --fail-on-incomplete --fail-on-risky
32+
33+

0 commit comments

Comments
 (0)