Skip to content

chore(deps): update dependency phpunit/phpunit to v12 #650

chore(deps): update dependency phpunit/phpunit to v12

chore(deps): update dependency phpunit/phpunit to v12 #650

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- "master"
jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-24.04
strategy:
matrix:
php-version: [8.3]
steps:
- uses: actions/checkout@v5
- uses: shivammathur/setup-php@v2
with:
coverage: none
extensions: json, snmp
php-version: ${{ matrix.php-version }}
tools: cs2pr
- name: Cache dependencies installed with composer
uses: actions/cache@v4
with:
path: ~/.composer/cache
key: php-${{ matrix.php-version }}
restore-keys: php-${{ matrix.php-version }}
- name: Install dependencies with composer
run: COMPOSER_ARGS="--prefer-stable" make
- name: Run a static analysis with phpstan/phpstan
env:
PHPSTAN_ARGS: --error-format=checkstyle
run: make -is static-analysis | cs2pr
coding-standards:
name: Coding Standards
runs-on: ubuntu-24.04
strategy:
matrix:
php-version: [8.3]
steps:
- uses: actions/checkout@v5
- uses: shivammathur/setup-php@v2
with:
coverage: none
extensions: snmp
php-version: ${{ matrix.php-version }}
tools: cs2pr
- name: Cache dependencies installed with composer
uses: actions/cache@v4
with:
path: ~/.composer/cache
key: php-${{ matrix.php-version }}
restore-keys: php-${{ matrix.php-version }}
- name: Install dependencies with composer
run: COMPOSER_ARGS="--prefer-stable" make
- name: Run squizlabs/php_codesniffer
env:
PHPCS_ARGS: -q --no-colors --report=checkstyle
run: make -is cs | cs2pr
tests:
name: Tests
runs-on: ubuntu-24.04
strategy:
matrix:
php-version: [8.3, 8.4]
dependencies: ["", --prefer-lowest]
steps:
- uses: actions/checkout@v5
- uses: shivammathur/setup-php@v2
with:
coverage: "pcov"
extensions: json, snmp
php-version: ${{ matrix.php-version }}
- name: Install dependencies
run: sudo apt install pipx snmp
- name: Install snmpsim
run: pipx install snmpsim
- name: Cache dependencies installed with composer
uses: actions/cache@v4
with:
path: ~/.composer/cache
key: php-${{ matrix.php-version }}-dependencies-${{ matrix.dependencies }}
restore-keys: php-${{ matrix.php-version }}
- name: Install dependencies with composer
run: COMPOSER_ARGS="--prefer-stable ${{ matrix.dependencies }}" make
- name: Run tests
run: PHPUNIT_ARGS="--coverage-clover coverage.xml" make test
- name: "Upload coverage file"
uses: actions/upload-artifact@v5
with:
name: "phpunit-${{ matrix.dependencies }}-${{ matrix.php-version }}.coverage"
path: "coverage.xml"
upload_coverage:
name: "Upload coverage to Codecov"
runs-on: "ubuntu-24.04"
needs:
- "tests"
steps:
- name: "Checkout"
uses: actions/checkout@v5
with:
fetch-depth: 2
- name: "Download coverage files"
uses: actions/download-artifact@v6
with:
path: "reports"
- name: "Upload to Codecov"
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
directory: reports