SanderSander/composer-link

View on GitHub
.github/workflows/integration-tests.yml

Summary

Maintainability
Test Coverage
name: PHPUnit

on:
  schedule:
    - cron: "0 0 * * *"
  push:
    branches:
      - master
      - v*
  pull_request:
    types:
      - synchronize
      - opened
      - reopened
      - ready_for_review

jobs:
  integration-tests:
    if: ${{ !github.event.pull_request.draft }}
    runs-on: ${{ matrix.operating-system }}
    strategy:
      fail-fast: false
      matrix:
        operating-system: ['ubuntu-latest', 'macos-latest', 'windows-latest']
        php-versions: [ '8.1', '8.2', '8.3' ]
        composer-versions: [ '2.2', 'v2' ]
    steps:
      - uses: actions/checkout@v3

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-versions }}
          tools: composer:${{ matrix.composer-versions }}

      - name: Validate composer.json
        run: composer validate --strict

      - name: Remove lock file
        run: rm composer.lock
        if: matrix.php-versions == '8.0'

      - name: Install dependencies
        run: composer install --prefer-dist --no-progress

      - name: Run unit tests
        run: ./vendor/bin/phpunit --testsuite=Integration --group=${{ matrix.operating-system }}