Bump codecov/codecov-action from 3 to 4 #66
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
on: | |
- pull_request | |
- push | |
name: build | |
jobs: | |
tests: | |
name: PHP ${{ matrix.php }}-redis-${{ matrix.redis }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
php: | |
- 8.1 | |
- 8.2 | |
- 8.3 | |
redis: | |
- 4 | |
- 5 | |
- 6 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Start Redis v4 | |
uses: superchargejs/[email protected] | |
with: | |
redis-version: ${{ matrix.redis }} | |
- name: Install PHP with extensions | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: curl, intl, redis | |
ini-values: date.timezone='UTC' | |
tools: composer:v2, pecl | |
- name: Install dependencies with Composer | |
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader | |
- name: Run tests with phpunit. | |
if: matrix.php != '8.1' | |
run: vendor/bin/phpunit --colors=always | |
- name: Run tests with phpunit and generate coverage. | |
if: matrix.php == '8.1' | |
run: vendor/bin/phpunit --coverage-clover=coverage.xml --colors=always | |
- name: Upload coverage to Codecov. | |
if: matrix.php == '8.1' | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml |