Skip to content

Commit f080be8

Browse files
committed
feat: add tests
1 parent 6c2fdd6 commit f080be8

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/run-tests.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Run Tests
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
push:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
php: [7.4, 8.0, 8.1, 8.2, 8.3]
16+
17+
name: PHP ${{ matrix.php }}
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
28+
coverage: none
29+
30+
- name: Get composer cache directory
31+
id: composer-cache
32+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
33+
34+
- name: Cache dependencies
35+
uses: actions/cache@v3
36+
with:
37+
path: ${{ steps.composer-cache.outputs.dir }}
38+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
39+
restore-keys: ${{ runner.os }}-composer-
40+
41+
- name: Install dependencies
42+
run: composer install --prefer-dist --no-progress
43+
44+
- name: Run tests
45+
run: vendor/bin/pest

0 commit comments

Comments
 (0)