-
-
Notifications
You must be signed in to change notification settings - Fork 73
92 lines (73 loc) · 2.14 KB
/
Copy pathtests.yml
File metadata and controls
92 lines (73 loc) · 2.14 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Tests
on:
push:
branches: [ main ]
pull_request:
jobs:
verify-fixture:
name: Verify Test Fixture Bundle
runs-on: ubuntu-24.04
steps:
- name: Checkout Code
uses: actions/checkout@v7
- name: Verify fixture bundle integrity, refs and size
run: tests/fixtures/verify-bundle.sh
check-cs:
name: Check Coding Standards
runs-on: ubuntu-24.04
steps:
- name: Checkout Code
uses: actions/checkout@v7
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
- name: Setup Castor
uses: castor-php/setup-castor@2a495b8c91f00be6768ad8a040ba8634c797d386 # v1.1.0
- name: Run CS check
run: castor cs --dry-run
phpstan:
name: Static Analysis
runs-on: ubuntu-24.04
steps:
- name: Checkout Code
uses: actions/checkout@v7
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
- name: Setup Castor
uses: castor-php/setup-castor@2a495b8c91f00be6768ad8a040ba8634c797d386 # v1.1.0
- name: Install dependencies
run: castor install
- name: Run PHPStan
run: castor phpstan
tests:
name: Test PHP ${{ matrix.php }} ${{ matrix.name }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
php: ['8.4', '8.5']
composer-flags: ['']
name: ['']
include:
- php: '8.4'
composer-flags: '--prefer-lowest'
name: '(prefer lowest dependencies)'
steps:
- name: Checkout Code
uses: actions/checkout@v7
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Setup Problem Matchers
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Validate composer.json
run: composer validate --strict
- name: Install Composer dependencies
run: |
composer update --prefer-dist --no-interaction ${{ matrix.composer-flags }}
- name: Execute PHPUnit
run: vendor/bin/phpunit