Skip to content

Commit b4819a8

Browse files
Merge pull request #24 from InitPHP/4.x
4.x
2 parents 641abb0 + 7366844 commit b4819a8

33 files changed

Lines changed: 3337 additions & 862 deletions

‎.github/workflows/ci.yml‎

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, '*.x']
6+
pull_request:
7+
branches: [main, '*.x']
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
qa:
14+
name: PHP ${{ matrix.php }} / QA
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
php: ['8.1', '8.2', '8.3', '8.4']
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Setup PHP
27+
uses: shivammathur/setup-php@v2
28+
with:
29+
php-version: ${{ matrix.php }}
30+
extensions: pdo, pdo_sqlite
31+
coverage: none
32+
tools: composer:v2
33+
env:
34+
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
36+
- name: Validate composer.json
37+
run: composer validate --strict
38+
39+
- name: Get Composer cache directory
40+
id: composer-cache
41+
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
42+
43+
- name: Cache Composer dependencies
44+
uses: actions/cache@v4
45+
with:
46+
path: ${{ steps.composer-cache.outputs.dir }}
47+
key: composer-${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('composer.json') }}
48+
restore-keys: |
49+
composer-${{ runner.os }}-${{ matrix.php }}-
50+
51+
- name: Install dependencies
52+
run: composer install --prefer-dist --no-progress --no-interaction
53+
54+
- name: Coding standards (phpcs)
55+
run: composer cs-ci
56+
57+
- name: Static analysis (PHPStan)
58+
run: composer stan
59+
60+
- name: Unit tests (PHPUnit)
61+
run: composer test

‎.gitignore‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@
44
/vendor/
55
/composer.lock
66
/.phpunit.result.cache
7+
/.phpunit.cache/
8+
/.phpcs-cache
9+
/.php-cs-fixer.cache
10+
/build/
711
/nbproject/private/
812
/*.log

0 commit comments

Comments
 (0)