-
Notifications
You must be signed in to change notification settings - Fork 0
123 lines (114 loc) · 4.11 KB
/
Copy pathci.yml
File metadata and controls
123 lines (114 loc) · 4.11 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: Continuous Integration
on:
pull_request:
push:
branches: [main]
# Actions are pinned by commit SHA (supply-chain rule used across this repo's
# inspirations): a tag is a pointer, a SHA is a fact.
permissions:
contents: read
jobs:
lint:
name: Lint code
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@f548e57e544e1ff5a4c46bf1e1b8685f8e4a348a # v6
- name: Install PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
php-version: '8.4'
coverage: none
- name: Install dependencies
run: composer install --no-interaction --no-progress
- name: Lint code
run: vendor/bin/phpcs
php-static-analysis:
name: PHPStan (level max)
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@f548e57e544e1ff5a4c46bf1e1b8685f8e4a348a # v6
- name: Install PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
php-version: '8.4'
coverage: none
- name: Install dependencies
run: composer install --no-interaction --no-progress
- name: Run PHPStan
run: vendor/bin/phpstan analyse --memory-limit=1G --no-progress
php-compatibility:
name: PHPCompatibility 8.2-8.5
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@f548e57e544e1ff5a4c46bf1e1b8685f8e4a348a # v6
- name: Install PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
php-version: '8.4'
coverage: none
- name: Install dependencies
run: composer install --no-interaction --no-progress
- name: Run PHPCompatibility
run: vendor/bin/phpcs -p --standard=PHPCompatibility --runtime-set testVersion 8.2-8.5 src adapters conformance tools
tests:
name: Tests (PHP ${{ matrix.php_version }})
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
php_version: ['8.2', '8.3', '8.4']
steps:
- name: Checkout repository
uses: actions/checkout@f548e57e544e1ff5a4c46bf1e1b8685f8e4a348a # v6
- name: Install PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
php-version: ${{ matrix.php_version }}
coverage: ${{ matrix.php_version == '8.4' && 'pcov' || 'none' }}
- name: Install dependencies
run: composer install --no-interaction --no-progress
- name: Run tests
run: vendor/bin/phpunit
- name: Coverage ratchet
if: matrix.php_version == '8.4'
run: |
php -d pcov.enabled=1 vendor/bin/phpunit --coverage-xml .coverage
php tools/phpunit-threshold.php
spec-validation:
name: Spec validation
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@f548e57e544e1ff5a4c46bf1e1b8685f8e4a348a # v6
- name: Install PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
php-version: '8.4'
coverage: none
- name: Install dependencies
run: composer install --no-interaction --no-progress
- name: Validate example specs
run: php bin/forge validate-spec spec/examples/generic-bnpl.yaml
semgrep:
name: Semgrep security rules
runs-on: ubuntu-24.04
container:
image: semgrep/semgrep:1.176.0
steps:
- name: Checkout repository
uses: actions/checkout@f548e57e544e1ff5a4c46bf1e1b8685f8e4a348a # v6
- name: Run semgrep
run: semgrep scan --config semgrep/rules --error src adapters conformance tools
journal-verification:
name: NoireBox journal verification
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@f548e57e544e1ff5a4c46bf1e1b8685f8e4a348a # v6
- name: Verify the generation journal
uses: slabbdev/noirebox-verify@8acc6b0b4c74f656cc4024992709ebeb605ec9de # v1
with:
export-path: journal/generation-export.json