[FEATURE] Determine the current time before the first task is run, to… #71
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Tests" | |
on: | |
pull_request: | |
push: | |
env: | |
fail-fast: true | |
jobs: | |
phpunit: | |
name: "PHPUnit" | |
runs-on: "ubuntu-20.04" | |
strategy: | |
matrix: | |
php-version: | |
- "7.4" | |
- "8.1" | |
- "8.2" | |
- "8.3" | |
symfony-version: | |
- "5.4.x" | |
- "6.4.x" | |
- "7.0.x" | |
monolog-version: | |
- "^2.9" | |
exclude: | |
- php-version: "7.4" | |
symfony-version: "6.4.x" | |
- php-version: "7.4" | |
symfony-version: "7.0.x" | |
- php-version: "8.1" | |
symfony-version: "7.0.x" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v4" | |
with: | |
fetch-depth: 2 | |
- name: "Install PHP" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
php-version: "${{ matrix.php-version }}" | |
- 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@v3 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
# Use composer.json for key, if composer.lock is not committed. | |
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install Composer dependencies | |
run: | | |
composer config minimum-stability dev | |
composer require --dev --no-update symfony/framework-bundle:${{ matrix.symfony-version }} monolog/monolog:${{ matrix.monolog-version }} | |
composer install --no-progress --prefer-dist --optimize-autoloader | |
- name: Run Tests | |
run: php vendor/bin/phpunit --coverage-text |