name: PhpUnitBridge

on:
  push:
    paths:
      - 'src/Symfony/Bridge/PhpUnit/**'
  pull_request:
    paths:
      - 'src/Symfony/Bridge/PhpUnit/**'

defaults:
  run:
    shell: bash

jobs:
  lint:
    name: Lint
    runs-on: Ubuntu-20.04

    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          coverage: "none"
          php-version: "7.1"

      - name: Lint
        run: find ./src/Symfony/Bridge/PhpUnit -name '*.php' | grep -v -e /Tests/ -e ForV7 -e ForV8 -e ForV9 -e ConstraintLogicTrait | parallel -j 4 php -l {}
