Skip to content

Bump codecov/codecov-action from 3 to 4 #56

Bump codecov/codecov-action from 3 to 4

Bump codecov/codecov-action from 3 to 4 #56

Workflow file for this run

name: validate
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
global-qa-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php:
- "8.2"
env:
extensions: ctype, dom, intl, json, mbstring, openssl, xml, zip, zlib
key: cache-v1
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup cache environment
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
key: ${{ env.key }}
- name: Cache extensions
uses: actions/cache@v3
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
with:
php-version: 8.2
extensions: ${{ env.extensions }}
tools: composer, pecl
coverage: xdebug
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: ramsey/composer-install@v2
with:
composer-options: "${{ matrix.composer-options }}"
- name: Setup Problem Matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Run PHPMD
run: vendor/bin/phpmd src,tests text ruleset.xml
- name: Run PHP-CS-Fixer
run: vendor/bin/php-cs-fixer check --diff --verbose
- name: Run PHPStan
run: vendor/bin/phpstan
- name: Run PHPUnit
run: vendor/bin/phpunit --coverage-clover coverage.xml
- name: Run Infection
run: vendor/bin/infection run
env:
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }}
- name: Run Composer Require Checker
run: vendor/bin/composer-require-checker
- name: Run Roave Security Checker
run: composer update --dry-run roave/security-advisories
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: ./coverage.xml
flags: unittests # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)