Release v1.0 #1
Workflow file for this run
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: Unit Tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
unit-tests: | |
name: Run Unit Tests | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
php: [8.2] | |
dependency-version: [prefer-stable] | |
steps: | |
# Check out the repository code | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Set up the desired PHP version with extensions and coverage | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: dom, mbstring, zip | |
coverage: pcov | |
# Determine the Composer cache directory | |
- name: Get Composer cache directory | |
id: composer-cache | |
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV | |
# Cache both the Composer cache directory and the vendor directory | |
- name: Cache Composer dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
${{ env.COMPOSER_CACHE_DIR }} | |
vendor | |
key: php-${{ matrix.php }}-deps-${{ hashFiles('composer.json', 'composer.lock') }} | |
restore-keys: | | |
php-${{ matrix.php }}-deps- | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-progress --no-suggest | |
- name: Run Rector (Dry Run) | |
run: composer test:refactor | |
- name: Run Lint Tests | |
run: composer test:lint | |
- name: Run PHPStan | |
run: composer test:types | |
- name: Run Pest Tests | |
run: composer test:unit |