Skip to content

feat: forge console — validate-spec as the first gate an adapter auth… #1

feat: forge console — validate-spec as the first gate an adapter auth…

feat: forge console — validate-spec as the first gate an adapter auth… #1

Workflow file for this run

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