Skip to content

Commit 85929e9

Browse files
committed
Added phpunit github actions workflow
1 parent 7ee95ed commit 85929e9

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/phpunit.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: PHPUnit Tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
tests:
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
php-version: [7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4]
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Setup PHP
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: ${{ matrix.php-version }}
24+
coverage: none
25+
tools: composer
26+
27+
- name: Cache Composer dependencies
28+
uses: actions/cache@v4
29+
with:
30+
path: ~/.composer/cache
31+
key: composer-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
32+
restore-keys: |
33+
composer-${{ matrix.php-version }}-
34+
35+
- name: Install dependencies
36+
run: composer update --no-interaction --prefer-dist
37+
38+
- name: Run tests
39+
run: composer test

0 commit comments

Comments
 (0)