name: Test

on:
  pull_request:
    branches: [main]
  push:
    branches: [main]
  workflow_dispatch:

concurrency:
  group: test-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: ${{ github.event_name == 'pull_request' }}

permissions:
  contents: read
  issues: write
  pull-requests: write

jobs:
  homeboy-test:
    name: Homeboy Test (PHP ${{ matrix.php-version }})
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        php-version: ['8.1', '8.2', '8.3', '8.4']

    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - uses: Extra-Chill/homeboy-action@v2
        with:
          commands: test
          php-version: ${{ matrix.php-version }}
          node-version: '24'
          autofix: 'false'
