Skip to content

start with testing

start with testing #22

Workflow file for this run

name: PHPCS check
on:
pull_request: {}
workflow_dispatch: {}
push:
branches: ["main"]
jobs:
phpcs:
name: PHPCS
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
lfs: false
persist-credentials: false
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
tools: cs2pr
- name: Install dependencies
run:
composer init --name=matomo/rebelmetrics --quiet;
composer --no-plugins config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true -n;
composer config repositories.matomo-coding-standards vcs https://github.com/matomo-org/matomo-coding-standards -n;
composer require matomo-org/matomo-coding-standards:dev-master;
composer install --prefer-dist --no-progress
- name: Check PHP code styles
id: phpcs
run: ./vendor/bin/phpcs --report-full --standard=tests/phpcs.xml --report-checkstyle=./phpcs-report.xml
- name: Show PHPCS results in PR
if: ${{ always() && steps.phpcs.outcome == 'failure' }}
run: cs2pr ./phpcs-report.xml