-
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (47 loc) · 1.85 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Continuous Integration
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
tests:
runs-on: ${{ matrix.os }}
env:
ENV: DEVELOPMENT
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: ['8.2', '8.3']
dependency_version: [prefer-dist, prefer-source]
name: PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency_version }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP & Enable Extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ runner.php }}
extensions: uopz
coverage: pcov
- name: Validate composer.json and composer.lock
run: composer validate --working-dir=./src --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: ./src/vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install PHP dependencies
run: composer install --working-dir=./src --${{ matrix.dependency_version }} --no-interaction --no-progress --ansi
- name: Check Coding Standards
run: ./src/vendor/bin/phpcs --standard=./src/phpcs.xml ./src/app ./src/tests
- name: Check with PHPStan
run: ./src/vendor/bin/phpstan analyse --configuration=./src/phpstan.neon ./src/app ./src/tests
- name: Check Test Cases
run: ./src/vendor/bin/phpunit --configuration=./src/phpunit.xml