Skip to content

Migrate coverage reporting from Coveralls to Codecov #39

Migrate coverage reporting from Coveralls to Codecov

Migrate coverage reporting from Coveralls to Codecov #39

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
env:
PSALM_PHP_VERSION: "8.4"
COVERAGE_PHP_VERSION: "8.4"
jobs:
psalm:
name: Psalm
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PSALM_PHP_VERSION }}
- name: Install composer dependencies
uses: ramsey/composer-install@v3
- name: Run Psalm
run: vendor/bin/psalm --no-progress
coding-standard:
name: Coding Standard
uses: brick/coding-standard/.github/workflows/coding-standard.yml@v2
with:
working-directory: "tools/ecs"
phpunit:
name: PHPUnit
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
deps:
- "highest"
include:
- php-version: "8.1"
deps: "lowest"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: xdebug
- name: Install composer dependencies
uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.deps }}
- name: Run PHPUnit
run: vendor/bin/phpunit
if: ${{ matrix.php-version != env.COVERAGE_PHP_VERSION }}
- name: Run PHPUnit with coverage
run: vendor/bin/phpunit --coverage-clover clover.xml
if: ${{ matrix.php-version == env.COVERAGE_PHP_VERSION }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
if: ${{ matrix.php-version == env.COVERAGE_PHP_VERSION }}