Skip to content

Merge pull request #664 from giggsey/upstream-8.13.52 #618

Merge pull request #664 from giggsey/upstream-8.13.52

Merge pull request #664 from giggsey/upstream-8.13.52 #618

Workflow file for this run

name: "Continuous Integration"
on:
push:
paths-ignore:
- 'docs/**'
pull_request:
paths-ignore:
- 'docs/**'
env:
COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --no-suggest --prefer-dist"
COVERAGE_FLAGS: "--coverage-text --coverage-clover build/logs/clover.xml"
SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT: "1"
jobs:
tests:
name: PHP ${{ matrix.php-version }}
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
- "8.4"
include:
- php-version: 8.3
coverage: coverage
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 10
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: dom
coverage: xdebug
env:
update: true
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Problem Matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ matrix.php-version }}-composer-
- name: Install Composer
uses: nick-invision/retry@v1
with:
timeout_minutes: 10
max_attempts: 3
command: composer update ${{ env.COMPOSER_FLAGS }}
- name: composer validate
run: composer validate --strict
- name: Test with phpunit (with coverage)
id: phpunit-coverage
if: "matrix.coverage == 'coverage'"
run: vendor/bin/phpunit --verbose ${{ env.COVERAGE_FLAGS }}
- name: Test with phpunit (without coverage)
if: "matrix.coverage != 'coverage'"
run: vendor/bin/phpunit --verbose
- name: Submit Coveralls
if: steps.phpunit-coverage.outcome == 'success'
uses: nick-invision/retry@v1
with:
timeout_minutes: 10
max_attempts: 3
command: |
[[ -f vendor/bin/php-coveralls ]] && COVERALLS_PATH=vendor/bin/php-coveralls || COVERALLS_PATH=vendor/bin/coveralls
[[ -n $COVERALLS_REPO_TOKEN ]] && php $COVERALLS_PATH -v --exclude-no-stmt || true
env:
COVERALLS_RUN_LOCALLY: 1
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}