Skip to content

Commit 27b82d1

Browse files
authored
Create ci.yml
1 parent 6786e07 commit 27b82d1

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: ✨ Build & Test
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
jobs:
10+
test:
11+
name: "PHP ${{ matrix.php-versions }}"
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
php-versions: ['8.1', '8.2', '8.3']
17+
18+
steps:
19+
- name: 📁 Checkout repository
20+
uses: actions/checkout@v4
21+
22+
- name: 🛠 Setup PHP
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: ${{ matrix.php-versions }}
26+
coverage: xdebug
27+
28+
- name: 📦 Install dependencies
29+
run: composer install --prefer-dist --no-interaction --no-progress
30+
31+
- name: 🧪 Run tests
32+
run: vendor/bin/phpunit --coverage-clover=tests/coverage/clover.xml
33+
34+
- name: ☂️ Upload code coverage (artifact)
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: coverage-${{ matrix.php-versions }}
38+
path: tests/coverage/clover.xml

0 commit comments

Comments
 (0)