netresearch/typo3-testing-skill / skills/typo3-testing
typo3-testing
FlaggedUse when reproducing defects as failing tests, testing template or rendered output changes, confirming changes on a running TYPO3 instance, or setting up TYPO3 extension tests: unit/functional/E2E, PHPUnit 11-13, mutation testing, final-class mocks (v14), CI matrix across TYPO3 12/13/14.3 LTS, typo3-ci-workflows meta-package, CI failures. Also: transaction rollback, worker crashes, competing requests, testing-framework setup, test matrix, integration/e2e testing, coverage, test generation.
assets/github-actions-tests.yml
View on GitHub# GitHub Actions Workflow for TYPO3 Extension Testing
#
# Place this file in .github/workflows/tests.yml
#
# CUSTOMIZATION REQUIRED:
# - Update PHP version matrix based on your minimum requirements
# - Update TYPO3 version matrix based on supported versions
# - Adjust codecov token secret name if needed
name: Tests
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
# ==========================================================================
# Code Quality Jobs
# ==========================================================================
lint:
name: PHP Lint
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.2', '8.3', '8.4']
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
- name: Run PHP linting
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -s lint
code-style:
name: Code Style (PHP-CS-Fixer)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
with:
php-version: '8.3'
tools: composer:v2
- name: Check code style
run: Build/Scripts/runTests.sh -s cgl -n
phpstan:
name: PHPStan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
with:
php-version: '8.3'
tools: composer:v2
- name: Run PHPStan
run: Build/Scripts/runTests.sh -s phpstan
rector:
name: Rector (dry-run)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
with:
php-version: '8.3'
tools: composer:v2
- name: Run Rector dry-run
run: Build/Scripts/runTests.sh -s rector -n
# ==========================================================================
# Unit Tests
# ==========================================================================
unit-tests:
name: Unit Tests (PHP ${{ matrix.php }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.2', '8.3', '8.4']
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
tools: composer:v2
- name: Run unit tests with coverage
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -s unit -x
- name: Upload coverage to Codecov
if: matrix.php == '8.3'
uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac # v5.5.5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: .Build/coverage/clover.xml
flags: unittests
fail_ci_if_error: false
verbose: true
# ==========================================================================
# Functional Tests
# ==========================================================================
functional-tests:
name: Functional (PHP ${{ matrix.php }}, TYPO3 ${{ matrix.typo3 }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# TYPO3 v12 LTS
- php: '8.2'
typo3: '12'
- php: '8.3'
typo3: '12'
# TYPO3 v13 LTS
- php: '8.3'
typo3: '13'
- php: '8.4'
typo3: '13'
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
with:
php-version: ${{ matrix.php }}
extensions: pdo_sqlite
tools: composer:v2
- name: Run functional tests (SQLite)
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -s functional -d sqlite
# ==========================================================================
# Architecture Tests (Optional)
# ==========================================================================
# architecture-tests:
# name: Architecture Tests (PHPat)
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
#
# - name: Setup PHP
# uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
# with:
# php-version: '8.3'
# tools: composer:v2
#
# - name: Run architecture tests
# run: Build/Scripts/runTests.sh -s architecture
# ==========================================================================
# Mutation Testing (Optional - runs on schedule or manual trigger)
# ==========================================================================
# mutation-tests:
# name: Mutation Testing
# runs-on: ubuntu-latest
# # Only run on main branch or manual trigger
# if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch'
# steps:
# - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
#
# - name: Setup PHP
# uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
# with:
# php-version: '8.3'
# coverage: pcov
# tools: composer:v2
#
# - name: Run mutation tests
# run: Build/Scripts/runTests.sh -s mutation
#
# - name: Upload mutation report
# uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
# with:
# name: mutation-report
# path: .Build/infection/
# retention-days: 7
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |