Skip to content

ci(deps): bump shivammathur/setup-php from 2.25.1 to 2.26.0 #271

ci(deps): bump shivammathur/setup-php from 2.25.1 to 2.26.0

ci(deps): bump shivammathur/setup-php from 2.25.1 to 2.26.0 #271

Workflow file for this run

name: Tests
on: [ 'push', 'pull_request' ]
jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
php: [ '8.1', '8.2' ]
dependency-version: [ prefer-lowest, prefer-stable ]
name: PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }}
steps:
- name: Checkout repository
uses: actions/checkout@v3.5.2
- name: Setup PHP environment
uses: shivammathur/setup-php@2.26.0
id: setup-php
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: pcov
- name: Get Composer Cache Directory
id: composer-cache-common
if: "${{ runner.os != 'Windows' }}"
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Get Composer Cache Directory
id: composer-cache-windows
if: "${{ runner.os == 'Windows' }}"
run: echo "dir=$(composer config cache-files-dir)" >> $env:GITHUB_OUTPUT
- uses: actions/cache@v3.3.1
with:
path: ${{ steps.composer-cache-common.outputs.dir }}${{ steps.composer-cache-windows.outputs.dir }}
key: ${{ runner.os }}-${{ steps.setup-php.outputs.php-version }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-${{ steps.setup-php.outputs.php-version }}-composer-
- name: Setup problem matches
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install PHP dependencies
run: composer update --${{ matrix.dependency-version }} --no-interaction --no-progress --ansi
- name: Run unit tests by phpunit
run: ./vendor/bin/phpunit --testdox --coverage-clover coverage.xml
- name: Collect test coverage
uses: codecov/codecov-action@v3.1.4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true