Skip to content

Added test for phpcs #541

Added test for phpcs

Added test for phpcs #541

Workflow file for this run

# Action for running tests
# This file has been automatically created.
# To recreate it you can run this command
# ./console generate:test-action --plugin="GoogleAnalyticsImporter" --php-versions="7.2,8.3" --dependent-plugins="matomo-org/plugin-MarketingCampaignsReporting innocraft/plugin-Funnels" --schedule-cron="10 3 * * 6"
name: Plugin GoogleAnalyticsImporter Tests
on:
pull_request:
types: [opened, synchronize]
push:
branches:
- '**.x-dev'
workflow_dispatch:
schedule:
- cron: "10 3 * * 6"
permissions:
actions: read
checks: none
contents: read
deployments: none
issues: read
packages: none
pull-requests: read
repository-projects: none
security-events: none
statuses: none
concurrency:
group: php-${{ github.ref }}
cancel-in-progress: true
jobs:
PluginTests:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
php: [ '7.2', '8.3' ]
target: ['minimum_required_matomo', 'maximum_supported_matomo']
steps:
- uses: actions/checkout@v3
with:
lfs: true
persist-credentials: false
- name: Install package ripgrep
run: sudo apt-get install ripgrep
- name: Run tests
uses: matomo-org/github-action-tests@main
with:
plugin-name: 'GoogleAnalyticsImporter'
php-version: ${{ matrix.php }}
test-type: 'PluginTests'
matomo-test-branch: ${{ matrix.target }}
artifacts-pass: ${{ secrets.ARTIFACTS_PASS }}
upload-artifacts: ${{ matrix.php == '7.2' && matrix.target == 'maximum_supported_matomo' }}
dependent-plugins: 'matomo-org/plugin-MarketingCampaignsReporting innocraft/plugin-Funnels'
github-token: ${{ secrets.TESTS_ACCESS_TOKEN || secrets.GITHUB_TOKEN }}
UI:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
lfs: true
persist-credentials: false
- name: running tests
uses: matomo-org/github-action-tests@main
with:
plugin-name: 'GoogleAnalyticsImporter'
matomo-test-branch: 'maximum_supported_matomo'
test-type: 'UI'
php-version: '7.2'
node-version: '16'
artifacts-pass: ${{ secrets.ARTIFACTS_PASS }}
upload-artifacts: true
dependent-plugins: 'matomo-org/plugin-MarketingCampaignsReporting innocraft/plugin-Funnels'
github-token: ${{ secrets.TESTS_ACCESS_TOKEN || secrets.GITHUB_TOKEN }}
phpcs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
lfs: false
persist-credentials: false
with:

Check failure on line 86 in .github/workflows/matomo-tests.yml

View workflow run for this annotation

GitHub Actions / Plugin GoogleAnalyticsImporter Tests

Invalid workflow file

The workflow is not valid. .github/workflows/matomo-tests.yml (Line: 86, Col: 9): 'with' is already defined
php-version: '7.2'
tools: cs2pr
- name: Check PHP code styles
id: phpcs
run: ./vendor/bin/phpcs --report-full --report-checkstyle=plugins/GoogleAnalyticsImporter/phpcs-report.xml plugins/GoogleAnalyticsImporter
- name: Show PHPCS results in PR
if: ${{ always() && steps.phpcs.outcome == 'failure' }}
run: cs2pr ./phpcs-report.xml