From 59cf352f7de1b13a821bb4133dc30b687617f4df Mon Sep 17 00:00:00 2001 From: Jacob Ransom Date: Fri, 11 Sep 2026 14:39:07 +1200 Subject: [PATCH 1/2] Put the pull request checks behind the shared umbrella [ignore_release] The callers this replaces were already thin wrappers around the same shared workflows, so one caller means a check added centrally reaches this plugin without a pull request here. It also drops the concurrency group the checklist workflow carried, which would span both of the umbrella's lanes and defeat them. --- .github/workflows/ci.yml | 23 ++++++++++++ .github/workflows/matomo-ai-checklist.yml | 32 ----------------- .github/workflows/phpcs.yml | 43 ----------------------- 3 files changed, 23 insertions(+), 75 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/matomo-ai-checklist.yml delete mode 100644 .github/workflows/phpcs.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..1074ce56 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,23 @@ +name: Plugins CI + +on: + pull_request: + types: [opened, synchronize, reopened, edited] + push: + branches: + - '**.x-dev' + workflow_dispatch: + +permissions: + actions: read + contents: read + pull-requests: read + +jobs: + ci: + uses: matomo-org/plugin-ci-workflows/.github/workflows/plugin-ci.yml@main + with: + plugin-name: DeviceDetectorCache + # PHPStan has never run here and there is no phpstan.neon to run it with; + # adding one is a decision of its own. + skip-phpstan: true diff --git a/.github/workflows/matomo-ai-checklist.yml b/.github/workflows/matomo-ai-checklist.yml deleted file mode 100644 index cc2c022d..00000000 --- a/.github/workflows/matomo-ai-checklist.yml +++ /dev/null @@ -1,32 +0,0 @@ -# Action for running tests - -name: AI Checklist - -on: - pull_request: - types: [opened, synchronize, reopened, edited] - -permissions: - actions: read - checks: none - contents: none - deployments: none - issues: none - packages: none - pull-requests: read - repository-projects: none - security-events: none - statuses: none - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - AiChecklist: - runs-on: ubuntu-24.04 - strategy: - fail-fast: false - steps: - - name: Run tests - uses: matomo-org/github-action-checklist-gate@main diff --git a/.github/workflows/phpcs.yml b/.github/workflows/phpcs.yml deleted file mode 100644 index 7cef1a5c..00000000 --- a/.github/workflows/phpcs.yml +++ /dev/null @@ -1,43 +0,0 @@ -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@v4 - with: - lfs: false - persist-credentials: false - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '8.1' - tools: cs2pr - - name: Install dependencies - run: - composer init --name=matomo/devicedetectorcache --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 --dev --prefer-dist --no-progress --no-suggest - - 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 From 704539e71d379bfd0c9d04f2c73fa00a42e35b1e Mon Sep 17 00:00:00 2001 From: Jacob Ransom Date: Fri, 11 Sep 2026 14:39:07 +1200 Subject: [PATCH 2/2] Build the non-default dev branch weekly [ignore_release] GitHub runs `schedule` only from the default branch's copy of a workflow, so the other maintained branch has had no weekly build of its own. The cron keeps this plugin's own minute and hour, moved to Sunday, so the fleet stays staggered. --- .github/workflows/weekly-branch-sweep.yml | 25 +++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/weekly-branch-sweep.yml diff --git a/.github/workflows/weekly-branch-sweep.yml b/.github/workflows/weekly-branch-sweep.yml new file mode 100644 index 00000000..b126cf22 --- /dev/null +++ b/.github/workflows/weekly-branch-sweep.yml @@ -0,0 +1,25 @@ +# Dispatches this plugin's build for each maintained branch that is not the default one, because +# GitHub only ever runs `schedule` from the default branch's copy of a workflow file. The logic +# lives in matomo-org/plugin-ci-workflows; see the "Branch sweep" section of its README.md for +# why this dispatches rather than building another branch's source here. + +name: Weekly branch sweep + +on: + schedule: + # Sunday, so it does not compete with this plugin's own Saturday build. Keeps the minute and + # hour of matomo-tests.yml's cron, so the fleet stays staggered across the window. + - cron: '15 3 * * 0' + workflow_dispatch: + +permissions: {} + +jobs: + sweep: + # Granted by the caller because permissions can only be maintained or reduced down a call + # chain, never elevated: the called workflow declares these too, but that can only cap them, + # not supply them, so without this block the dispatch is unauthorised. + permissions: + actions: write + contents: read + uses: matomo-org/plugin-ci-workflows/.github/workflows/plugin-branch-sweep.yml@main