Skip to content

Commit e170548

Browse files
committed
chore(ci): Add github action to test code.
1 parent 6dd3b40 commit e170548

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/ci.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CI
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
- 1.x
9+
- 2.x
10+
pull_request:
11+
12+
jobs:
13+
test:
14+
name: Test on PHP ${{ matrix.php-versions }}
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
php-versions: ['8.1', '8.2', '8.3']
21+
22+
steps:
23+
- uses: actions/checkout@v3
24+
25+
- name: Setup PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: ${{ matrix.php-versions }}
29+
coverage: none
30+
31+
- name: Install composer and dependencies
32+
uses: php-actions/composer@v6
33+
34+
- name: Run Code Sniffer
35+
run: vendor/bin/phpcs
36+
37+
- name: Run phpstan
38+
run: vendor/bin/phpstan analyse -c phpstan.neon --no-progress
39+
40+
- name: Run Pest
41+
run: vendor/bin/pest

0 commit comments

Comments
 (0)