Skip to content

Full checks

Full checks #1130

Workflow file for this run

name: "Full checks"
on:
schedule:
- cron: '0 10 * * *'
pull_request:
push:
branches:
- master
jobs:
full-checks:
name: "PHP version ${{ matrix.php-version }}, deps. ${{ matrix.dependencies }}"
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
dependencies:
- "lowest"
- "locked"
- "highest"
php-version:
- "8.0"
- "8.1"
- "8.2"
operating-system:
- "ubuntu-22.04"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: Xdebug
php-version: "${{ matrix.php-version }}"
tools: composer
- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}"
- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: "composer update --prefer-lowest --no-interaction --no-progress"
- name: "Install locked dependencies"
if: ${{ matrix.dependencies == 'locked' }}
run: "composer install --no-interaction --no-progress"
- name: "Install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: "composer update --no-interaction --no-progress"
- name: "Full CI"
run: "composer ci-${{ matrix.php-version }}"
one-version-only:
name: "Runs code coverage, infection and deptrac"
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
dependencies:
- "locked"
php-version:
- "8.1"
operating-system:
- "ubuntu-22.04"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: Xdebug
php-version: "${{ matrix.php-version }}"
tools: composer, infection, qossmic/deptrac-shim
- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}"
- name: "Install locked dependencies"
if: ${{ matrix.dependencies == 'locked' }}
run: "composer install --no-interaction --no-progress"
- name: "Run tests"
run: "composer test"
- name: "Upload code coverage"
uses: codecov/codecov-action@v1
with:
file: reports/phpunit.xml
name: Test coverage
- name: "Run deptrack"
run: composer deptrac
- name: "Run mutation tests with Xdebug and infection/infection"
env:
INFECTION_BADGE_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
run: "infection --configuration=infection.json.dist"