Skip to content

Commit c389def

Browse files
committed
build: Add actions for test package in github
1 parent 509442b commit c389def

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/tests.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
php-version: [8.3, 8.4]
16+
17+
name: PHP ${{ matrix.php-version }}
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-version }}
27+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
28+
coverage: none
29+
30+
- name: Cache Composer packages
31+
id: composer-cache
32+
uses: actions/cache@v3
33+
with:
34+
path: vendor
35+
key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
36+
restore-keys: |
37+
${{ runner.os }}-php-${{ matrix.php-version }}-
38+
39+
- name: Install dependencies
40+
run: composer install --prefer-dist --no-progress
41+
42+
- name: Run tests
43+
run: composer test
44+
45+
- name: Run code formatting check
46+
run: composer pint
47+
48+
- name: Run static analysis
49+
run: composer analyse

0 commit comments

Comments
 (0)