Skip to content

Commit 0afdce9

Browse files
committed
Replace tests.yml with ci.yml, introducing PHP CS Fixer and PHPStan jobs for improved code quality enforcement.
1 parent 007444e commit 0afdce9

2 files changed

Lines changed: 71 additions & 30 deletions

File tree

.github/workflows/ci.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
php-cs-fixer:
11+
name: PHP CS Fixer
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Setup PHP
18+
uses: shivammathur/setup-php@v2
19+
with:
20+
php-version: '8.4'
21+
coverage: none
22+
tools: cs2pr
23+
24+
- name: Install dependencies
25+
run: composer install --prefer-dist --no-progress
26+
27+
- name: Run PHP CS Fixer
28+
run: vendor/bin/php-cs-fixer fix --dry-run --diff --format=checkstyle | cs2pr
29+
30+
phpstan:
31+
name: PHPStan
32+
runs-on: ubuntu-latest
33+
34+
steps:
35+
- uses: actions/checkout@v4
36+
37+
- name: Setup PHP
38+
uses: shivammathur/setup-php@v2
39+
with:
40+
php-version: '8.4'
41+
coverage: none
42+
43+
- name: Install dependencies
44+
run: composer install --prefer-dist --no-progress
45+
46+
- name: Run PHPStan
47+
run: vendor/bin/phpstan analyse --no-progress --error-format=github
48+
49+
tests:
50+
name: Tests
51+
runs-on: ubuntu-latest
52+
needs: [php-cs-fixer, phpstan]
53+
54+
strategy:
55+
matrix:
56+
php: ['8.4']
57+
58+
steps:
59+
- uses: actions/checkout@v4
60+
61+
- name: Setup PHP
62+
uses: shivammathur/setup-php@v2
63+
with:
64+
php-version: ${{ matrix.php }}
65+
coverage: none
66+
67+
- name: Install dependencies
68+
run: composer install --prefer-dist --no-progress
69+
70+
- name: Run tests
71+
run: vendor/bin/phpunit

.github/workflows/tests.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)