Skip to content

Commit edd000d

Browse files
committed
ci: add GitHub Actions workflow
Run PHPUnit, PHPStan, PHPCS, and doc test linting on push and PR to main.
1 parent 3d470a1 commit edd000d

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
tests:
11+
name: PHP ${{ matrix.php }} - ${{ matrix.stability }}
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
php: ['8.4']
17+
stability: [prefer-stable]
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Setup PHP
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: ${{ matrix.php }}
26+
extensions: mbstring, intl, bcmath
27+
coverage: xdebug
28+
29+
- name: Install dependencies
30+
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction
31+
32+
- name: Run PHPUnit
33+
run: vendor/bin/phpunit
34+
35+
- name: Run PHPStan
36+
run: vendor/bin/phpstan analyse --no-progress --memory-limit=512M
37+
38+
- name: Run PHPCS
39+
run: vendor/bin/phpcs --standard=phpcs.ruleset.xml src tests
40+
41+
- name: Run doc tests
42+
run: php bin/doctest lint --directory=tests/Fixtures/EndToEnd --no-cache

0 commit comments

Comments
 (0)