martin-helmich/typo3-typoscript-parser

View on GitHub
.github/workflows/php-downstream.yml

Summary

Maintainability
Test Coverage
name: Unit tests of downstream project

on:
  pull_request:

jobs:
  build:
    strategy:
      matrix:
        php-versions: ["8.1", "8.2", "8.3"]
        symfony-versions: ["^5.4", "^6.4", "^7.0"]
        exclude:
          - php-versions: "8.1"
            symfony-versions: "^7.0"
    runs-on: ubuntu-latest
    continue-on-error: true

    steps:
    - name: Check out downstream project (typoscript-lint)
      uses: actions/checkout@v2
      with:
        repository: martin-helmich/typo3-typoscript-lint

    - name: Checkout PR
      uses: actions/checkout@v2
      with:
        path: .dev/typo3-typoscript-parser

    - name: Setup PHP
      uses: shivammathur/setup-php@v2
      with:
        php-version: ${{ matrix.php-versions }}
        extensions: mbstring, intl, json
        coverage: pcov
      env:
        COMPOSER_TOKEN: ${{ github.token }}

    - name: Validate composer.json and composer.lock
      run: composer validate

    - name: Declare required Symfony version
      run: |
        composer require --no-update symfony/dependency-injection ${{ matrix.symfony-versions }}
        composer require --no-update symfony/config ${{ matrix.symfony-versions }}
        composer require --no-update symfony/yaml ${{ matrix.symfony-versions }}

    - name: Require the "version under test" with Composer
      run: |
        composer config repositories.pull-request path .dev/typo3-typoscript-parser
        composer require --no-update 'helmich/typo3-typoscript-parser:*'

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

    - name: Run unit tests
      run: ./vendor/bin/phpunit --testdox