name: "Integrate" on: pull_request: ~ push: branches: - master schedule: - cron: "0 10 * * *" jobs: static-code-analysis: name: "Static Code Analysis (PHP: ${{matrix.php-version}}, deps: ${{matrix.dependencies}})" runs-on: ubuntu-latest strategy: fail-fast: false matrix: php-version: - 7.3 - 7.4 - 8.0 dependencies: - highest - lowest exclude: - php-version: 7.3 dependencies: lowest - php-version: 7.4 dependencies: lowest steps: - name: "Checkout" uses: actions/checkout@v2 - name: "Install PHP with extensions" uses: shivammathur/setup-php@v2 with: coverage: none php-version: ${{ matrix.php-version }} - name: Install Composer dependencies uses: ramsey/composer-install@v1 with: dependency-versions: ${{ matrix.dependencies }} - name: "Cache cache directory for vimeo/psalm" uses: actions/cache@v1 with: path: .build/psalm key: php-${{ matrix.php-version }}-psalm-${{ github.sha }} restore-keys: php-${{ matrix.php-version }}-psalm- - name: "Run vimeo/psalm" run: vendor/bin/psalm --find-dead-code --find-unused-psalm-suppress --shepherd --show-info=false --stats --output-format=github --php-version=${{ matrix.php-version }} if: matrix.php-version != '8.0' - name: "Run vimeo/psalm" run: vendor/bin/psalm --find-dead-code --find-unused-psalm-suppress --shepherd --show-info=false --stats --output-format=github --php-version=8.0 if: matrix.php-version == '8.0' tests: name: "Tests (PHP: ${{matrix.php-version}}, Symfony: ${{matrix.symfony-version}})" runs-on: ubuntu-latest strategy: fail-fast: false matrix: php-version: - 7.1 - 7.2 - 7.3 - 7.4 - 8.0 symfony-version: - 4 - 5 - 6 exclude: - php-version: 7.1 symfony-version: 5 - php-version: 7.1 symfony-version: 6 - php-version: 7.2 symfony-version: 6 - php-version: 7.3 symfony-version: 6 - php-version: 7.4 symfony-version: 6 - php-version: 7.1 symfony-version: 6 - php-version: 8.0 symfony-version: 3 - php-version: 8.0 symfony-version: 6 steps: - name: "Checkout" uses: actions/checkout@v2 - name: "Install PHP with extensions" uses: shivammathur/setup-php@v2 with: coverage: none php-version: ${{ matrix.php-version }} tools: flex - name: "Restrict symfony dependencies to the correct version" run: composer config extra.symfony.require ${{ matrix.symfony-version }}.* - name: Install Composer dependencies uses: ramsey/composer-install@v1 - name: "Run unit tests with phpunit" run: vendor/bin/phpunit --configuration=phpunit.xml - name: "Build acceptance tests with codeception" run: vendor/bin/codecept build - name: "Run acceptance tests with codeception" run: vendor/bin/codecept run -v -g symfony-common -g symfony-${{ matrix.symfony-version }} - name: "Run acceptance tests with codeception PHP8 only tests" run: vendor/bin/codecept run -v -g php-8 if: matrix.php-version == '8.0'