Skip to content

Upgrade to PHPStan version 2 #377

Upgrade to PHPStan version 2

Upgrade to PHPStan version 2 #377

Workflow file for this run

name: Tests
on:
pull_request:
paths:
- "**.php"
- ".github/workflows/test.yml"
push:
branches: [main]
paths:
- "**.php"
- ".github/workflows/test.yml"
jobs:
test:
name: PHPUnit
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup PHP
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
with:
php-version: '8.2'
coverage: xdebug
extensions: mbstring
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: "Validate composer.json and composer.lock"
run: "composer validate --no-check-publish"
- name: Install dependencies with composer
run: composer install --prefer-dist
- name: Run phpunit
run: ./vendor/bin/phpunit --coverage-clover=coverage.xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
token: ${{ secrets.CODECOV_TOKEN }}