Run MCP smoke tests with AI CLI tools #154
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PHPCS check | |
| on: pull_request | |
| permissions: | |
| actions: read | |
| checks: read | |
| contents: read | |
| deployments: none | |
| issues: read | |
| packages: none | |
| pull-requests: read | |
| repository-projects: none | |
| security-events: none | |
| statuses: read | |
| jobs: | |
| phpcs: | |
| name: PHPCS | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| lfs: false | |
| persist-credentials: false | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2 | |
| with: | |
| php-version: '8.1' | |
| tools: cs2pr | |
| - name: Install dependencies | |
| run: | | |
| composer init --name=matomo/mcpserver --quiet | |
| composer --no-plugins config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true -n | |
| composer --no-plugins config allow-plugins.php-http/discovery false -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=phpcs.xml --report-checkstyle=./phpcs-report.xml | |
| - name: Show PHPCS results in PR | |
| if: ${{ always() && steps.phpcs.outcome == 'failure' }} | |
| run: cs2pr ./phpcs-report.xml --prepend-filename |