Skip to content

Commit a081527

Browse files
committed
ci: add GitHub Actions workflow for automated testing
1 parent 808b1c6 commit a081527

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/tests.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
php: [8.2, 8.3, 8.4]
16+
17+
name: PHP ${{ matrix.php }} - Laravel 12
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Setup PHP
24+
uses: shivammathur/setup-php@v2
25+
with:
26+
php-version: ${{ matrix.php }}
27+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv
28+
coverage: xdebug
29+
30+
- name: Install dependencies
31+
run: composer install --prefer-dist --no-interaction
32+
33+
- name: Execute tests
34+
run: vendor/bin/phpunit
35+
36+
- name: Upload coverage to Codecov (PHP 8.4 only)
37+
if: matrix.php == '8.4'
38+
uses: codecov/codecov-action@v3

0 commit comments

Comments
 (0)