Skip to content

Implement RRule merging logic for ScheduleSet with iterative reduction #49

Implement RRule merging logic for ScheduleSet with iterative reduction

Implement RRule merging logic for ScheduleSet with iterative reduction #49

Workflow file for this run

name: Tests
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
permissions:
contents: read
jobs:
test:
name: Run PHPUnit Tests
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['8.0', '8.1', '8.2', '8.3']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: json, zip, dom
coverage: xdebug
- name: Validate composer.json
run: composer validate --strict --no-check-version
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php-version }}-
- name: Install dependencies
run: composer update --prefer-dist --no-progress # use update to allow for different php versions in matrix.
- name: Run test suite
run: composer test
- name: Generate coverage report (PHP 8.3 only)
if: matrix.php-version == '8.3'
run: ./vendor/bin/phpunit --coverage-clover coverage.xml
- name: Upload coverage to artifact (PHP 8.3 only)
if: matrix.php-version == '8.3'
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage.xml