Skip to content

chore(deps): bump codecov/codecov-action from 5.1.2 to 5.3.1 #80

chore(deps): bump codecov/codecov-action from 5.1.2 to 5.3.1

chore(deps): bump codecov/codecov-action from 5.1.2 to 5.3.1 #80

# GitHub Actions Documentation: https://docs.github.com/en/actions
name: "ci"
on:
push:
pull_request:
# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
coding-standards:
name: "Coding standards"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout repository"
uses: "actions/checkout@v4"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "8.3"
coverage: "none"
- name: "Install dependencies (Composer)"
uses: "ramsey/composer-install@v3"
with:
composer-options: "--ignore-platform-req=ext-swoole"
- name: "Check coding standards (easy-coding-standard)"
run: "composer ecs"
static-analysis:
name: "Static analysis"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout repository"
uses: "actions/checkout@v4"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "8.3"
coverage: "none"
- name: "Install dependencies (Composer)"
uses: "ramsey/composer-install@v3"
with:
composer-options: "--ignore-platform-req=ext-swoole"
- name: "Statically analyze code (PHPStan)"
run: "composer phpstan -- --ansi"
- name: "Statically analyze code (Psalm)"
run: "composer psalm -- --shepherd"
benchmark:
name: "Benchmark"
needs: ["coding-standards", "static-analysis"]
runs-on: "${{ matrix.operating-system }}"
strategy:
fail-fast: false
matrix:
php-version:
- "8.2"
- "8.3"
swoole-version:
- "5.1.6"
- "6.0.0"
operating-system:
- "ubuntu-latest"
steps:
- name: "Checkout repository"
uses: "actions/checkout@v4"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
extensions: "swoole-${{ matrix.swoole-version }}"
ini-values: "memory_limit=-1"
coverage: "none"
- name: "Install dependencies (Composer)"
uses: "ramsey/composer-install@v3"
- name: "Run PHPBench"
run: "composer phpbench -- --ansi"
code-coverage:
name: "Code coverage"
needs: ["coding-standards", "static-analysis"]
runs-on: "ubuntu-latest"
steps:
- name: "Checkout repository"
uses: "actions/checkout@v4"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "8.3"
extensions: "swoole-6.0.0"
ini-values: "memory_limit=-1"
coverage: "pcov"
- name: "Install dependencies (Composer)"
uses: "ramsey/composer-install@v3"
- name: "Run unit tests (PHPUnit)"
run: "php bin/co-phpunit --colors=always --coverage-text --coverage-clover build/logs/clover.xml"
- name: "Publish coverage report to Codecov"
uses: "codecov/[email protected]"
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
unit-tests:
name: "Unit Tests"
needs: ["code-coverage"]
runs-on: "${{ matrix.operating-system }}"
strategy:
fail-fast: false
matrix:
php-version:
- "8.2"
- "8.3"
swoole-version:
- "5.1.6"
- "6.0.0"
operating-system:
- "ubuntu-latest"
steps:
- name: "Checkout repository"
uses: "actions/checkout@v4"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
extensions: "swoole-${{ matrix.swoole-version }}"
ini-values: "memory_limit=-1"
coverage: "none"
- name: "Install dependencies (Composer)"
uses: "ramsey/composer-install@v3"
- name: "Run unit tests (PHPUnit)"
run: "composer phpunit"