# https://docs.github.com/en/actions name: "Integrate" on: pull_request: null push: branches: - "master" jobs: tests: name: "Tests" runs-on: "ubuntu-latest" strategy: fail-fast: false matrix: include: - php-version: "7.1" phpunit-version: "7.*" - php-version: "7.2" phpunit-version: "7.*" - php-version: "7.2" phpunit-version: "8.*" - php-version: "7.3" phpunit-version: "8.*" - php-version: "7.3" phpunit-version: "9.*" - php-version: "7.4" phpunit-version: "8.*" - php-version: "7.4" phpunit-version: "9.*" - php-version: "8.0" phpunit-version: "8.*" - php-version: "8.0" phpunit-version: "9.*" steps: - name: "Checkout" uses: "actions/checkout@v2" - name: "Set up PHP" uses: "shivammathur/setup-php@v2" with: coverage: "none" php-version: "${{ matrix.php-version }}" - name: "Set up problem matchers for phpunit/phpunit" run: "echo \"::add-matcher::${{ runner.tool_cache }}/phpunit.json\"" - name: "Determine composer cache directory" run: "echo \"COMPOSER_CACHE_DIR=$(composer config cache-dir)\" >> $GITHUB_ENV" - name: "Cache dependencies installed with composer" uses: "actions/cache@v2" with: path: "${{ env.COMPOSER_CACHE_DIR }}" key: "php-${{ matrix.php-version }}-composer-${{ matrix.phpunit-version }}" restore-keys: "php-${{ matrix.php-version }}-composer-" - name: "Require phpunit/phpunit ${{ matrix.phpunit-version }}" run: "composer require phpunit/phpunit:${{ matrix.phpunit-version }}" - name: "Run tests with phpunit/phpunit" run: "vendor/bin/phpunit"