Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Continuous integration for extensions

Set up CI for an extension the way the kernel does it - GitHub Actions jobs for PHP syntax on every supported version, PHPUnit, static analysis, commit message checks, least privileges, and testing against the…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/creators/app-creators/ci-for-extensions.md

On this page

Continuous integration for extensions

This page is for application creators who want every push of their extension checked automatically. The kernel's own workflows in .github/workflows/ are a tested model (GitHub Actions workflows).

Contents

  1. What the kernel's CI does
  2. A workflow for an extension
  3. Testing against the kernel
  4. Rules

What the kernel's CI does

WorkflowChecks
quality.ymlPHP and JavaScript syntax of changed files, the file manifest, commit messages, code style (warning), PHPStan
phpunit.ymlPHPUnit on PHP 8.1 to 8.5, and a job with MySQL and PostgreSQL
performance.ymla micro benchmark against a baseline (warning only)
ci-health.ymla weekly report of pass rates and flaky tests

A workflow for an extension

# .github/workflows/ci.yml
name: CI
on: [push, pull_request]
permissions:
  contents: read
jobs:
  lint:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        php: ['8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
    steps:
      - uses: actions/checkout@v4
      - uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php }}
      - run: find . -name '*.php' -not -path './vendor/*' -print0 | xargs -0 -n1 php -l
  tests:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: shivammathur/setup-php@v2
        with:
          php-version: '8.3'
      - run: composer install --no-interaction
      - run: vendor/bin/phpunit tests/

Lint on every PHP version the kernel supports (8.0 to 8.5, Requirements), because installations run on all of them.

Testing against the kernel

Tests that need kernel classes run in a checkout of se7enxweb/exponential with your extension placed in extension/: check out both, run composer install in the kernel, copy or link your extension, regenerate autoloads, then run your tests with the kernel's phpunit.xml bootstrap. Keep these tests DB-less where possible (DB-less PHPUnit tests).

Rules

  • Least privileges: permissions: contents: read; no pull_request_target.
  • A timeout per job.
  • Pin action versions; update them deliberately.
  • No secrets in logs; secrets only where a job truly needs them, never on pull requests from forks.
  • Red CI blocks the release tag (Versions and releases).

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x