Skip to content

Leverage tsconfig.json configuration to @tsconfig/node22 #43

Leverage tsconfig.json configuration to @tsconfig/node22

Leverage tsconfig.json configuration to @tsconfig/node22 #43

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
# Cancel any in-progress run for the same ref (branch/PR) when a new commit is pushed.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- name: Set node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .nvmrc
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm run lint
- name: Format check
run: pnpm run fmt:check
test:
name: Node ${{ matrix.node-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: ['22', '24', '26']
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- name: Set node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm build
- name: Test
run: pnpm test
php:
name: PHP ${{ matrix.php-version }} + Symfony ${{ matrix.symfony-version }}${{ matrix.dependency-version == 'lowest' && ' lowest' || '' }} on ${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
permissions:
contents: read
strategy:
fail-fast: false
matrix:
include:
# Symfony 7.4 LTS on the lowest supported PHP, resolving the lowest allowed dependencies.
- php-version: '8.4'
symfony-version: 7.4.*
dependency-version: lowest
- php-version: '8.4'
symfony-version: 8.0.*
- php-version: '8.5'
symfony-version: 7.4.*
- php-version: '8.5'
symfony-version: 8.0.*
# Windows
- php-version: '8.4'
symfony-version: 7.4.*
os: windows-latest
- php-version: '8.5'
symfony-version: 8.1.*
os: windows-latest
env:
# symfony/flex (installed as a global tool below) reads SYMFONY_REQUIRE and forces every
# symfony/* package to this version during the Composer resolution.
SYMFONY_REQUIRE: ${{ matrix.symfony-version }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: ${{ matrix.php-version }}
tools: flex
- name: Install dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
with:
dependency-versions: ${{ matrix.dependency-version == 'lowest' && 'lowest' || 'highest' }}
composer-options: --prefer-dist
custom-cache-suffix: ${{ matrix.symfony-version }}
- name: PHPUnit
run: vendor/bin/phpunit
php-qa:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: '8.4'
tools: composer:v2
- name: Validate composer.json
run: composer validate --strict
- name: Install dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
with:
dependency-versions: highest
composer-options: --prefer-dist
- name: PHPStan
run: vendor/bin/phpstan analyse
- name: PHP-CS-Fixer
run: vendor/bin/php-cs-fixer fix --dry-run --diff