Upgrade github action dependencies #175
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: "Continuous Integration" | |
on: [ push, pull_request ] | |
env: | |
fail-fast: true | |
jobs: | |
phpunit: | |
name: "PHPUnit" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
php-version: | |
- "8.3" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v4" | |
with: | |
fetch-depth: 2 | |
- name: "Install PHP with Xdebug" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
php-version: "${{ matrix.php-version }}" | |
coverage: "xdebug" | |
ini-values: "zend.assertions=1" | |
- name: "Cache dependencies installed with composer" | |
uses: "actions/cache@v4" | |
with: | |
path: "~/.composer/cache" | |
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}" | |
restore-keys: "php-${{ matrix.php-version }}-composer-locked-" | |
- name: "Install dependencies with composer" | |
run: "composer install --no-interaction --prefer-dist" | |
- name: "Run PHPUnit" | |
run: "php bin/phpunit --coverage-clover=coverage.xml" | |
- name: "Upload coverage file" | |
uses: "actions/upload-artifact@v4" | |
with: | |
name: "phpunit-${{ matrix.php-version }}.coverage" | |
path: "coverage.xml" | |
upload_coverage: | |
name: "Upload coverage to Codecov" | |
runs-on: "ubuntu-latest" | |
needs: | |
- "phpunit" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v4" | |
with: | |
fetch-depth: 2 | |
- name: "Download coverage files" | |
uses: "actions/download-artifact@v4" | |
with: | |
path: "reports" | |
- name: "Upload to Codecov" | |
uses: "codecov/codecov-action@v4" | |
with: | |
directory: "reports" |