name: Composer

on:
  pull_request:
    paths:
      - '.github/workflows/composer.yml'
      - 'composer.json'
      - 'composer.lock'
      - 'vendor-bin/**/composer.json'
      - 'vendor-bin/**/composer.lock'

  push:
    branches:
      - master
      - stable*

permissions:
  contents: read

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      # do not stop on another job's failure
      fail-fast: false
      matrix:
        php-versions: ['7.4']

    name: php${{ matrix.php-versions }}

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

      - name: Set up php ${{ matrix.php-versions }}
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-versions }}
          coverage: none

      - name: Install dependencies & build
        run: composer i
