1# https://help.github.com/en/categories/automating-your-workflow-with-github-actions 2 3on: 4 - "pull_request" 5 - "push" 6 7name: "CI" 8 9jobs: 10 tests: 11 name: "Tests" 12 13 runs-on: "ubuntu-latest" 14 15 strategy: 16 fail-fast: false 17 matrix: 18 php-version: 19 - "7.2" 20 - "7.3" 21 - "7.4" 22 - "8.0" 23 dependencies: 24 - highest 25 experimental: 26 - false 27 28 include: 29 - php-version: "8.1" 30 dependencies: highest 31 experimental: true 32 33 continue-on-error: ${{ matrix.experimental }} 34 steps: 35 - name: "Configure git to avoid issues with line endings" 36 run: "git config --global core.autocrlf false" 37 38 - name: "Checkout" 39 uses: "actions/checkout@v2" 40 41 - name: "Install PHP with extensions" 42 uses: "shivammathur/setup-php@v2" 43 with: 44 php-version: "${{ matrix.php-version }}" 45 coverage: "pcov" 46 47 - name: "Cache dependencies" 48 uses: actions/cache@v2 49 with: 50 path: "~/.composer/cache" 51 key: "php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }}" 52 restore-keys: "php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" 53 54 - name: "Install dependencies" 55 run: "php tools/composer.phar install --prefer-dist" 56 57 - name: "Run tests with phpunit.phar" 58 run: "php tools/phpunit.phar --coverage-clover=coverage.xml" 59