Migrate workflows to MokoStandards reusable workflow architecture #42
422
.github/workflows/ci.yml
vendored
@@ -18,9 +18,8 @@ permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
# Repository Validation
|
||||
validation:
|
||||
name: Repository Validation
|
||||
ci:
|
||||
name: Repository Validation Pipeline
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
@@ -68,425 +67,16 @@ jobs:
|
||||
python3 scripts/validate/version_alignment.py || echo "version_alignment validation not yet converted"
|
||||
python3 scripts/validate/version_hierarchy.py || echo "version_hierarchy validation not yet converted"
|
||||
|
||||
- name: Validation Summary
|
||||
- name: CI summary
|
||||
if: always()
|
||||
run: |
|
||||
{
|
||||
echo "### Repository Validation Summary"
|
||||
echo "### CI Execution Summary"
|
||||
echo ""
|
||||
echo "- Repository: $GITHUB_REPOSITORY"
|
||||
echo "- Branch: $GITHUB_REF_NAME"
|
||||
echo "- Commit: $GITHUB_SHA"
|
||||
echo "- Runner: ubuntu-latest"
|
||||
echo ""
|
||||
echo "Validation completed. Review logs above for details."
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
# PHP Code Quality Checks
|
||||
phpcs:
|
||||
name: PHP_CodeSniffer - PHP ${{ matrix.php-version }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php-version: ['8.0', '8.1', '8.2', '8.3']
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
extensions: mbstring, xml, ctype, json, zip
|
||||
coverage: none
|
||||
tools: cs2pr
|
||||
|
||||
- name: Cache Composer packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.composer
|
||||
key: ${{ runner.os }}-composer-phpcs-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-composer-phpcs-${{ matrix.php-version }}-
|
||||
|
||||
- name: Install PHP_CodeSniffer
|
||||
env:
|
||||
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"}}'
|
||||
run: |
|
||||
composer global require "squizlabs/php_codesniffer:^3.0" --with-all-dependencies
|
||||
composer global require "phpcompatibility/php-compatibility:^9.0" --with-all-dependencies
|
||||
|
||||
# Register PHPCompatibility standard
|
||||
phpcs --config-set installed_paths ~/.composer/vendor/phpcompatibility/php-compatibility
|
||||
|
||||
- name: Run PHP_CodeSniffer
|
||||
run: |
|
||||
phpcs --standard=phpcs.xml --report=checkstyle | cs2pr
|
||||
continue-on-error: true
|
||||
|
||||
- name: PHPCS Summary
|
||||
if: always()
|
||||
run: |
|
||||
{
|
||||
echo "### PHP_CodeSniffer Results"
|
||||
echo ""
|
||||
echo "- PHP Version: ${{ matrix.php-version }}"
|
||||
echo "- Standard: PSR-12 with Joomla rules"
|
||||
echo ""
|
||||
phpcs --standard=phpcs.xml --report=summary || true
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
phpstan:
|
||||
name: PHPStan - PHP ${{ matrix.php-version }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php-version: ['8.0', '8.1', '8.2', '8.3']
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
extensions: mbstring, xml, ctype, json, zip
|
||||
coverage: none
|
||||
|
||||
- name: Cache Composer packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.composer
|
||||
key: ${{ runner.os }}-composer-phpstan-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-composer-phpstan-${{ matrix.php-version }}-
|
||||
|
||||
- name: Install PHPStan
|
||||
env:
|
||||
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"}}'
|
||||
run: |
|
||||
composer global config --no-plugins allow-plugins.phpstan/extension-installer true
|
||||
composer global require phpstan/phpstan "^1.0" --with-all-dependencies
|
||||
composer global require phpstan/extension-installer "^1.0" --with-all-dependencies
|
||||
|
||||
- name: Run PHPStan
|
||||
run: |
|
||||
phpstan analyse --configuration=phpstan.neon --error-format=github --no-progress
|
||||
continue-on-error: true
|
||||
|
||||
- name: PHPStan Summary
|
||||
if: always()
|
||||
run: |
|
||||
{
|
||||
echo "### PHPStan Results"
|
||||
echo ""
|
||||
echo "- PHP Version: ${{ matrix.php-version }}"
|
||||
echo "- Analysis Level: 5"
|
||||
echo ""
|
||||
phpstan analyse --configuration=phpstan.neon --no-progress || true
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
php-compatibility:
|
||||
name: PHP Compatibility Check
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.3'
|
||||
extensions: mbstring, xml, ctype, json, zip
|
||||
coverage: none
|
||||
|
||||
- name: Cache Composer packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.composer
|
||||
key: ${{ runner.os }}-composer-phpcompat-8.3-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-composer-phpcompat-8.3-
|
||||
|
||||
- name: Install dependencies
|
||||
env:
|
||||
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"}}'
|
||||
run: |
|
||||
composer global require "squizlabs/php_codesniffer:^3.0" --with-all-dependencies
|
||||
composer global require "phpcompatibility/php-compatibility:^9.0" --with-all-dependencies
|
||||
phpcs --config-set installed_paths ~/.composer/vendor/phpcompatibility/php-compatibility
|
||||
|
||||
- name: Check PHP 8.0+ Compatibility
|
||||
run: |
|
||||
phpcs --standard=PHPCompatibility --runtime-set testVersion 8.0- src/
|
||||
continue-on-error: true
|
||||
|
||||
- name: Compatibility Summary
|
||||
if: always()
|
||||
run: |
|
||||
{
|
||||
echo "### PHP Compatibility Check Results"
|
||||
echo ""
|
||||
echo "- Target: PHP 8.0+"
|
||||
echo "- Status: Check completed"
|
||||
echo ""
|
||||
echo "See job logs for detailed compatibility issues."
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
# Joomla Integration Testing
|
||||
joomla-setup:
|
||||
name: Joomla ${{ matrix.joomla-version }} - PHP ${{ matrix.php-version }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php-version: ['8.0', '8.1', '8.2', '8.3']
|
||||
joomla-version: ['4.4', '5.0', '5.1']
|
||||
exclude:
|
||||
# Joomla 4.4 doesn't support PHP 8.3
|
||||
- php-version: '8.3'
|
||||
joomla-version: '4.4'
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
env:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: joomla_test
|
||||
ports:
|
||||
- 3306:3306
|
||||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
extensions: mbstring, xml, ctype, json, zip, mysqli, pdo, pdo_mysql, gd, curl, openssl, fileinfo
|
||||
coverage: none
|
||||
tools: composer:v2
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
|
||||
- name: Cache Joomla Downloads
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /tmp/joomla-cache
|
||||
key: joomla-${{ matrix.joomla-version }}
|
||||
restore-keys: |
|
||||
joomla-${{ matrix.joomla-version }}
|
||||
|
||||
- name: Download Joomla ${{ matrix.joomla-version }}
|
||||
run: |
|
||||
mkdir -p /tmp/joomla
|
||||
mkdir -p /tmp/joomla-cache
|
||||
|
||||
# Define ZIP file based on version
|
||||
if [ "${{ matrix.joomla-version }}" = "4.4" ]; then
|
||||
ZIP_FILE="Joomla_4-4-9-Stable-Full_Package.zip"
|
||||
ZIP_URL="https://downloads.joomla.org/cms/joomla4/4-4-9/${ZIP_FILE}"
|
||||
elif [ "${{ matrix.joomla-version }}" = "5.0" ]; then
|
||||
ZIP_FILE="Joomla_5-0-3-Stable-Full_Package.zip"
|
||||
ZIP_URL="https://downloads.joomla.org/cms/joomla5/5-0-3/${ZIP_FILE}"
|
||||
else
|
||||
ZIP_FILE="Joomla_5-1-4-Stable-Full_Package.zip"
|
||||
ZIP_URL="https://downloads.joomla.org/cms/joomla5/5-1-4/${ZIP_FILE}"
|
||||
fi
|
||||
|
||||
# Use cached ZIP if available, otherwise download
|
||||
if [ -f "/tmp/joomla-cache/${ZIP_FILE}" ]; then
|
||||
echo "Using cached Joomla package: ${ZIP_FILE}"
|
||||
cp "/tmp/joomla-cache/${ZIP_FILE}" "/tmp/joomla/"
|
||||
else
|
||||
echo "Downloading Joomla package: ${ZIP_FILE}"
|
||||
wget -q "${ZIP_URL}" -O "/tmp/joomla/${ZIP_FILE}"
|
||||
cp "/tmp/joomla/${ZIP_FILE}" "/tmp/joomla-cache/"
|
||||
fi
|
||||
|
||||
cd /tmp/joomla
|
||||
unzip -q "${ZIP_FILE}"
|
||||
|
||||
- name: Configure Joomla
|
||||
run: |
|
||||
cd /tmp/joomla
|
||||
|
||||
# Create configuration.php
|
||||
cat > configuration.php << 'EOF'
|
||||
<?php
|
||||
class JConfig {
|
||||
public $offline = '0';
|
||||
public $offline_message = 'This site is down for maintenance.<br>Please check back again soon.';
|
||||
public $display_offline_message = '1';
|
||||
public $offline_image = '';
|
||||
public $sitename = 'Joomla Test Site';
|
||||
public $editor = 'tinymce';
|
||||
public $captcha = '0';
|
||||
public $list_limit = '20';
|
||||
public $access = '1';
|
||||
public $debug = '0';
|
||||
public $debug_lang = '0';
|
||||
public $debug_lang_const = '1';
|
||||
public $dbtype = 'mysqli';
|
||||
public $host = '127.0.0.1';
|
||||
public $user = 'root';
|
||||
public $password = 'root';
|
||||
public $db = 'joomla_test';
|
||||
public $dbprefix = 'jos_';
|
||||
public $dbencryption = 0;
|
||||
public $dbsslverifyservercert = false;
|
||||
public $dbsslkey = '';
|
||||
public $dbsslcert = '';
|
||||
public $dbsslca = '';
|
||||
public $dbsslcipher = '';
|
||||
public $force_ssl = 0;
|
||||
public $live_site = '';
|
||||
public $secret = 'testSecretKey123';
|
||||
public $gzip = '0';
|
||||
public $error_reporting = 'default';
|
||||
public $helpurl = 'https://help.joomla.org/proxy?keyref=Help{major}{minor}:{keyref}&lang={langcode}';
|
||||
public $offset = 'UTC';
|
||||
public $mailonline = '1';
|
||||
public $mailer = 'mail';
|
||||
public $mailfrom = 'test@example.com';
|
||||
public $fromname = 'Joomla Test';
|
||||
public $sendmail = '/usr/sbin/sendmail';
|
||||
public $smtpauth = '0';
|
||||
public $smtpuser = '';
|
||||
public $smtppass = '';
|
||||
public $smtphost = 'localhost';
|
||||
public $smtpsecure = 'none';
|
||||
public $smtpport = '25';
|
||||
public $caching = '0';
|
||||
public $cache_handler = 'file';
|
||||
public $cachetime = '15';
|
||||
public $cache_platformprefix = '0';
|
||||
public $MetaDesc = '';
|
||||
public $MetaAuthor = '1';
|
||||
public $MetaVersion = '0';
|
||||
public $robots = '';
|
||||
public $sef = '1';
|
||||
public $sef_rewrite = '0';
|
||||
public $sef_suffix = '0';
|
||||
public $unicodeslugs = '0';
|
||||
public $feed_limit = '10';
|
||||
public $feed_email = 'none';
|
||||
public $log_path = '/tmp/joomla/administrator/logs';
|
||||
public $tmp_path = '/tmp/joomla/tmp';
|
||||
public $lifetime = '15';
|
||||
public $session_handler = 'database';
|
||||
public $shared_session = '0';
|
||||
public $session_metadata = true;
|
||||
}
|
||||
EOF
|
||||
|
||||
- name: Install Joomla database
|
||||
run: |
|
||||
mysql -h 127.0.0.1 -uroot -proot joomla_test < /tmp/joomla/installation/sql/mysql/base.sql || true
|
||||
mysql -h 127.0.0.1 -uroot -proot joomla_test < /tmp/joomla/installation/sql/mysql/extensions.sql || true
|
||||
mysql -h 127.0.0.1 -uroot -proot joomla_test < /tmp/joomla/installation/sql/mysql/supports.sql || true
|
||||
|
||||
- name: Install template into Joomla
|
||||
run: |
|
||||
# Copy template files to Joomla
|
||||
mkdir -p /tmp/joomla/templates/moko-cassiopeia
|
||||
cp -r src/templates/* /tmp/joomla/templates/moko-cassiopeia/ || true
|
||||
|
||||
# Copy media files
|
||||
mkdir -p /tmp/joomla/media/templates/site/moko-cassiopeia
|
||||
cp -r src/media/* /tmp/joomla/media/templates/site/moko-cassiopeia/ || true
|
||||
|
||||
# Copy language files
|
||||
mkdir -p /tmp/joomla/language/en-GB
|
||||
cp src/language/en-GB/*.ini /tmp/joomla/language/en-GB/ || true
|
||||
mkdir -p /tmp/joomla/administrator/language/en-GB
|
||||
cp src/administrator/language/en-GB/*.ini /tmp/joomla/administrator/language/en-GB/ || true
|
||||
|
||||
- name: Validate template installation
|
||||
run: |
|
||||
if [ -f "/tmp/joomla/templates/moko-cassiopeia/templateDetails.xml" ]; then
|
||||
echo "✓ Template installed successfully"
|
||||
php -l /tmp/joomla/templates/moko-cassiopeia/index.php
|
||||
else
|
||||
echo "✗ Template installation failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Test Summary
|
||||
if: always()
|
||||
run: |
|
||||
{
|
||||
echo "### Joomla ${{ matrix.joomla-version }} Testing with PHP ${{ matrix.php-version }}"
|
||||
echo ""
|
||||
echo "- Joomla Version: ${{ matrix.joomla-version }}"
|
||||
echo "- PHP Version: ${{ matrix.php-version }}"
|
||||
echo "- MySQL Version: 8.0"
|
||||
echo ""
|
||||
echo "✓ Joomla installation completed"
|
||||
echo "✓ Template files copied"
|
||||
echo "✓ Template validated"
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
codeception:
|
||||
name: Codeception Tests
|
||||
runs-on: ubuntu-latest
|
||||
needs: joomla-setup
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.1'
|
||||
extensions: mbstring, xml, ctype, json, zip, mysqli, pdo, pdo_mysql
|
||||
coverage: xdebug
|
||||
tools: composer:v2
|
||||
|
||||
- name: Cache Composer packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.composer
|
||||
key: ${{ runner.os }}-composer-codeception-8.1-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-composer-codeception-8.1-
|
||||
|
||||
- name: Install Codeception
|
||||
env:
|
||||
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"}}'
|
||||
run: |
|
||||
composer global require codeception/codeception
|
||||
composer global require codeception/module-db
|
||||
composer global require codeception/module-asserts
|
||||
|
||||
- name: Create test structure
|
||||
run: |
|
||||
mkdir -p tests/_output
|
||||
mkdir -p tests/_data
|
||||
mkdir -p tests/_support
|
||||
|
||||
- name: Run Codeception bootstrap
|
||||
run: |
|
||||
codecept bootstrap || echo "Bootstrap skipped - structure exists"
|
||||
|
||||
- name: Codeception Summary
|
||||
run: |
|
||||
{
|
||||
echo "### Codeception Test Framework"
|
||||
echo ""
|
||||
echo "- Framework: Codeception"
|
||||
echo "- Status: Ready for test implementation"
|
||||
echo ""
|
||||
echo "Note: Test suites should be implemented in future iterations."
|
||||
echo "CI completed. Review logs above for validation outcomes."
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
270
.github/workflows/joomla_testing.yml
vendored
Normal file
@@ -0,0 +1,270 @@
|
||||
name: Joomla Testing
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- dev/**
|
||||
- rc/**
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- dev/**
|
||||
- rc/**
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
joomla-setup:
|
||||
name: Joomla ${{ matrix.joomla-version }} - PHP ${{ matrix.php-version }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php-version: ['8.0', '8.1', '8.2', '8.3']
|
||||
joomla-version: ['4.4', '5.0', '5.1']
|
||||
exclude:
|
||||
# Joomla 4.4 doesn't support PHP 8.3
|
||||
- php-version: '8.3'
|
||||
joomla-version: '4.4'
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
env:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: joomla_test
|
||||
ports:
|
||||
- 3306:3306
|
||||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
extensions: mbstring, xml, ctype, json, zip, mysqli, pdo, pdo_mysql, gd, curl, openssl, fileinfo
|
||||
coverage: none
|
||||
tools: composer:v2
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
|
||||
- name: Cache Joomla Downloads
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /tmp/joomla-cache
|
||||
key: joomla-${{ matrix.joomla-version }}
|
||||
restore-keys: |
|
||||
joomla-${{ matrix.joomla-version }}
|
||||
|
||||
- name: Download Joomla ${{ matrix.joomla-version }}
|
||||
run: |
|
||||
mkdir -p /tmp/joomla
|
||||
mkdir -p /tmp/joomla-cache
|
||||
|
||||
# Define ZIP file based on version
|
||||
if [ "${{ matrix.joomla-version }}" = "4.4" ]; then
|
||||
ZIP_FILE="Joomla_4-4-9-Stable-Full_Package.zip"
|
||||
ZIP_URL="https://downloads.joomla.org/cms/joomla4/4-4-9/${ZIP_FILE}"
|
||||
elif [ "${{ matrix.joomla-version }}" = "5.0" ]; then
|
||||
ZIP_FILE="Joomla_5-0-3-Stable-Full_Package.zip"
|
||||
ZIP_URL="https://downloads.joomla.org/cms/joomla5/5-0-3/${ZIP_FILE}"
|
||||
else
|
||||
ZIP_FILE="Joomla_5-1-4-Stable-Full_Package.zip"
|
||||
ZIP_URL="https://downloads.joomla.org/cms/joomla5/5-1-4/${ZIP_FILE}"
|
||||
fi
|
||||
|
||||
# Use cached ZIP if available, otherwise download
|
||||
if [ -f "/tmp/joomla-cache/${ZIP_FILE}" ]; then
|
||||
echo "Using cached Joomla package: ${ZIP_FILE}"
|
||||
cp "/tmp/joomla-cache/${ZIP_FILE}" "/tmp/joomla/"
|
||||
else
|
||||
echo "Downloading Joomla package: ${ZIP_FILE}"
|
||||
wget -q "${ZIP_URL}" -O "/tmp/joomla/${ZIP_FILE}"
|
||||
cp "/tmp/joomla/${ZIP_FILE}" "/tmp/joomla-cache/"
|
||||
fi
|
||||
|
||||
cd /tmp/joomla
|
||||
unzip -q "${ZIP_FILE}"
|
||||
|
||||
- name: Configure Joomla
|
||||
run: |
|
||||
cd /tmp/joomla
|
||||
|
||||
# Create configuration.php
|
||||
cat > configuration.php << 'EOF'
|
||||
<?php
|
||||
class JConfig {
|
||||
public $offline = '0';
|
||||
public $offline_message = 'This site is down for maintenance.<br>Please check back again soon.';
|
||||
public $display_offline_message = '1';
|
||||
public $offline_image = '';
|
||||
public $sitename = 'Joomla Test Site';
|
||||
public $editor = 'tinymce';
|
||||
public $captcha = '0';
|
||||
public $list_limit = '20';
|
||||
public $access = '1';
|
||||
public $debug = '0';
|
||||
public $debug_lang = '0';
|
||||
public $debug_lang_const = '1';
|
||||
public $dbtype = 'mysqli';
|
||||
public $host = '127.0.0.1';
|
||||
public $user = 'root';
|
||||
public $password = 'root';
|
||||
public $db = 'joomla_test';
|
||||
public $dbprefix = 'jos_';
|
||||
public $dbencryption = 0;
|
||||
public $dbsslverifyservercert = false;
|
||||
public $dbsslkey = '';
|
||||
public $dbsslcert = '';
|
||||
public $dbsslca = '';
|
||||
public $dbsslcipher = '';
|
||||
public $force_ssl = 0;
|
||||
public $live_site = '';
|
||||
public $secret = 'testSecretKey123';
|
||||
public $gzip = '0';
|
||||
public $error_reporting = 'default';
|
||||
public $helpurl = 'https://help.joomla.org/proxy?keyref=Help{major}{minor}:{keyref}&lang={langcode}';
|
||||
public $offset = 'UTC';
|
||||
public $mailonline = '1';
|
||||
public $mailer = 'mail';
|
||||
public $mailfrom = 'test@example.com';
|
||||
public $fromname = 'Joomla Test';
|
||||
public $sendmail = '/usr/sbin/sendmail';
|
||||
public $smtpauth = '0';
|
||||
public $smtpuser = '';
|
||||
public $smtppass = '';
|
||||
public $smtphost = 'localhost';
|
||||
public $smtpsecure = 'none';
|
||||
public $smtpport = '25';
|
||||
public $caching = '0';
|
||||
public $cache_handler = 'file';
|
||||
public $cachetime = '15';
|
||||
public $cache_platformprefix = '0';
|
||||
public $MetaDesc = '';
|
||||
public $MetaAuthor = '1';
|
||||
public $MetaVersion = '0';
|
||||
public $robots = '';
|
||||
public $sef = '1';
|
||||
public $sef_rewrite = '0';
|
||||
public $sef_suffix = '0';
|
||||
public $unicodeslugs = '0';
|
||||
public $feed_limit = '10';
|
||||
public $feed_email = 'none';
|
||||
public $log_path = '/tmp/joomla/administrator/logs';
|
||||
public $tmp_path = '/tmp/joomla/tmp';
|
||||
public $lifetime = '15';
|
||||
public $session_handler = 'database';
|
||||
public $shared_session = '0';
|
||||
public $session_metadata = true;
|
||||
}
|
||||
EOF
|
||||
|
||||
- name: Install Joomla database
|
||||
run: |
|
||||
mysql -h 127.0.0.1 -uroot -proot joomla_test < /tmp/joomla/installation/sql/mysql/base.sql || true
|
||||
mysql -h 127.0.0.1 -uroot -proot joomla_test < /tmp/joomla/installation/sql/mysql/extensions.sql || true
|
||||
mysql -h 127.0.0.1 -uroot -proot joomla_test < /tmp/joomla/installation/sql/mysql/supports.sql || true
|
||||
|
||||
- name: Install template into Joomla
|
||||
run: |
|
||||
# Copy template files to Joomla
|
||||
mkdir -p /tmp/joomla/templates/moko-cassiopeia
|
||||
cp -r src/templates/* /tmp/joomla/templates/moko-cassiopeia/ || true
|
||||
|
||||
# Copy media files
|
||||
mkdir -p /tmp/joomla/media/templates/site/moko-cassiopeia
|
||||
cp -r src/media/* /tmp/joomla/media/templates/site/moko-cassiopeia/ || true
|
||||
|
||||
# Copy language files
|
||||
mkdir -p /tmp/joomla/language/en-GB
|
||||
cp src/language/en-GB/*.ini /tmp/joomla/language/en-GB/ || true
|
||||
mkdir -p /tmp/joomla/administrator/language/en-GB
|
||||
cp src/administrator/language/en-GB/*.ini /tmp/joomla/administrator/language/en-GB/ || true
|
||||
|
||||
- name: Validate template installation
|
||||
run: |
|
||||
if [ -f "/tmp/joomla/templates/moko-cassiopeia/templateDetails.xml" ]; then
|
||||
echo "✓ Template installed successfully"
|
||||
php -l /tmp/joomla/templates/moko-cassiopeia/index.php
|
||||
else
|
||||
echo "✗ Template installation failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Test Summary
|
||||
if: always()
|
||||
run: |
|
||||
{
|
||||
echo "### Joomla ${{ matrix.joomla-version }} Testing with PHP ${{ matrix.php-version }}"
|
||||
echo ""
|
||||
echo "- Joomla Version: ${{ matrix.joomla-version }}"
|
||||
echo "- PHP Version: ${{ matrix.php-version }}"
|
||||
echo "- MySQL Version: 8.0"
|
||||
echo ""
|
||||
echo "✓ Joomla installation completed"
|
||||
echo "✓ Template files copied"
|
||||
echo "✓ Template validated"
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
codeception:
|
||||
name: Codeception Tests
|
||||
runs-on: ubuntu-latest
|
||||
needs: joomla-setup
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.1'
|
||||
extensions: mbstring, xml, ctype, json, zip, mysqli, pdo, pdo_mysql
|
||||
coverage: xdebug
|
||||
tools: composer:v2
|
||||
|
||||
- name: Cache Composer packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.composer
|
||||
key: ${{ runner.os }}-composer-codeception-8.1-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-composer-codeception-8.1-
|
||||
|
||||
- name: Install Codeception
|
||||
env:
|
||||
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"}}'
|
||||
run: |
|
||||
composer global require codeception/codeception
|
||||
composer global require codeception/module-db
|
||||
composer global require codeception/module-asserts
|
||||
|
||||
- name: Create test structure
|
||||
run: |
|
||||
mkdir -p tests/_output
|
||||
mkdir -p tests/_data
|
||||
mkdir -p tests/_support
|
||||
|
||||
- name: Run Codeception bootstrap
|
||||
run: |
|
||||
codecept bootstrap || echo "Bootstrap skipped - structure exists"
|
||||
|
||||
- name: Codeception Summary
|
||||
run: |
|
||||
{
|
||||
echo "### Codeception Test Framework"
|
||||
echo ""
|
||||
echo "- Framework: Codeception"
|
||||
echo "- Status: Ready for test implementation"
|
||||
echo ""
|
||||
echo "Note: Test suites should be implemented in future iterations."
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
174
.github/workflows/php_quality.yml
vendored
Normal file
@@ -0,0 +1,174 @@
|
||||
name: PHP Code Quality
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- dev/**
|
||||
- rc/**
|
||||
- version/**
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- dev/**
|
||||
- rc/**
|
||||
- version/**
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
phpcs:
|
||||
name: PHP_CodeSniffer
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php-version: ['8.0', '8.1', '8.2', '8.3']
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
extensions: mbstring, xml, ctype, json, zip
|
||||
coverage: none
|
||||
tools: cs2pr
|
||||
|
||||
- name: Cache Composer packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.composer
|
||||
key: ${{ runner.os }}-composer-phpcs-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-composer-phpcs-${{ matrix.php-version }}-
|
||||
|
||||
- name: Install PHP_CodeSniffer
|
||||
env:
|
||||
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"}}'
|
||||
run: |
|
||||
composer global require "squizlabs/php_codesniffer:^3.0" --with-all-dependencies
|
||||
composer global require "phpcompatibility/php-compatibility:^9.0" --with-all-dependencies
|
||||
|
||||
# Register PHPCompatibility standard
|
||||
phpcs --config-set installed_paths ~/.composer/vendor/phpcompatibility/php-compatibility
|
||||
|
||||
- name: Run PHP_CodeSniffer
|
||||
run: |
|
||||
phpcs --standard=phpcs.xml --report=checkstyle | cs2pr
|
||||
continue-on-error: true
|
||||
|
||||
- name: PHPCS Summary
|
||||
if: always()
|
||||
run: |
|
||||
{
|
||||
echo "### PHP_CodeSniffer Results"
|
||||
echo ""
|
||||
echo "- PHP Version: ${{ matrix.php-version }}"
|
||||
echo "- Standard: PSR-12 with Joomla rules"
|
||||
echo ""
|
||||
phpcs --standard=phpcs.xml --report=summary || true
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
phpstan:
|
||||
name: PHPStan Static Analysis
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php-version: ['8.0', '8.1', '8.2', '8.3']
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
extensions: mbstring, xml, ctype, json, zip
|
||||
coverage: none
|
||||
|
||||
- name: Cache Composer packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.composer
|
||||
key: ${{ runner.os }}-composer-phpstan-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-composer-phpstan-${{ matrix.php-version }}-
|
||||
|
||||
- name: Install PHPStan
|
||||
env:
|
||||
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"}}'
|
||||
run: |
|
||||
composer global config --no-plugins allow-plugins.phpstan/extension-installer true
|
||||
composer global require phpstan/phpstan "^1.0" --with-all-dependencies
|
||||
composer global require phpstan/extension-installer "^1.0" --with-all-dependencies
|
||||
|
||||
- name: Run PHPStan
|
||||
run: |
|
||||
phpstan analyse --configuration=phpstan.neon --error-format=github --no-progress
|
||||
continue-on-error: true
|
||||
|
||||
- name: PHPStan Summary
|
||||
if: always()
|
||||
run: |
|
||||
{
|
||||
echo "### PHPStan Results"
|
||||
echo ""
|
||||
echo "- PHP Version: ${{ matrix.php-version }}"
|
||||
echo "- Analysis Level: 5"
|
||||
echo ""
|
||||
phpstan analyse --configuration=phpstan.neon --no-progress || true
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
php-compatibility:
|
||||
name: PHP Compatibility Check
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.3'
|
||||
extensions: mbstring, xml, ctype, json, zip
|
||||
coverage: none
|
||||
|
||||
- name: Cache Composer packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.composer
|
||||
key: ${{ runner.os }}-composer-phpcompat-8.3-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-composer-phpcompat-8.3-
|
||||
|
||||
- name: Install dependencies
|
||||
env:
|
||||
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"}}'
|
||||
run: |
|
||||
composer global require "squizlabs/php_codesniffer:^3.0" --with-all-dependencies
|
||||
composer global require "phpcompatibility/php-compatibility:^9.0" --with-all-dependencies
|
||||
phpcs --config-set installed_paths ~/.composer/vendor/phpcompatibility/php-compatibility
|
||||
|
||||
- name: Check PHP 8.0+ Compatibility
|
||||
run: |
|
||||
phpcs --standard=PHPCompatibility --runtime-set testVersion 8.0- src/
|
||||
continue-on-error: true
|
||||
|
||||
- name: Compatibility Summary
|
||||
if: always()
|
||||
run: |
|
||||
{
|
||||
echo "### PHP Compatibility Check Results"
|
||||
echo ""
|
||||
echo "- Target: PHP 8.0+"
|
||||
echo "- Status: Check completed"
|
||||
echo ""
|
||||
echo "See job logs for detailed compatibility issues."
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
237
docs/MOKOSTANDARDS_MIGRATION.md
Normal file
@@ -0,0 +1,237 @@
|
||||
# MokoStandards Migration Guide
|
||||
|
||||
## Current Status
|
||||
|
||||
As of 2026-01-09, the consolidation has been **reverted** to restore the original three separate workflow files:
|
||||
- `.github/workflows/ci.yml` (82 lines) - Repository validation
|
||||
- `.github/workflows/php_quality.yml` (174 lines) - PHP quality checks
|
||||
- `.github/workflows/joomla_testing.yml` (270 lines) - Joomla integration testing
|
||||
|
||||
## Why Revert the Consolidation?
|
||||
|
||||
The initial consolidation approach created a **monolithic** `ci.yml` file (492 lines) that combined all three workflows. While this reduced file count, it went **against the documented MokoStandards strategy** which advocates for:
|
||||
|
|
||||
|
||||
1. **Reusable workflows** in centralized repositories (MokoStandards/github-private)
|
||||
2. **Thin caller workflows** in project repositories
|
||||
3. **Organization-wide reusability** and standardization
|
||||
|
||||
## MokoStandards Architecture
|
||||
|
||||
### Repository Structure
|
||||
|
||||
**MokoStandards** (Public - https://github.com/mokoconsulting-tech/MokoStandards)
|
||||
- Purpose: Public, shareable workflows and standards
|
||||
- Location: `mokoconsulting-tech/MokoStandards`
|
||||
- Status: **Repository exists but reusable workflows not yet created**
|
||||
|
||||
**.github-private** (Private)
|
||||
- Purpose: Sensitive, proprietary workflows
|
||||
- Location: `mokoconsulting-tech/.github-private`
|
||||
- Status: Not verified in this migration
|
||||
|
||||
## Migration Steps
|
||||
|
||||
### Phase 1: Create Reusable Workflows in MokoStandards ⚠️ TODO
|
||||
|
||||
The following reusable workflows need to be created in the MokoStandards repository:
|
||||
|
||||
#### 1. `reusable-php-quality.yml`
|
||||
|
||||
Location: `MokoStandards/.github/workflows/reusable-php-quality.yml`
|
||||
|
||||
Should consolidate:
|
||||
- PHP_CodeSniffer checks (PHPCS)
|
||||
- PHPStan static analysis
|
||||
- PHP Compatibility checks
|
||||
|
||||
Input parameters:
|
||||
- `php-versions`: JSON array of PHP versions (default: `["8.0", "8.1", "8.2", "8.3"]`)
|
||||
- `php-extensions`: Extensions to install (default: `"mbstring, xml, ctype, json, zip"`)
|
||||
- `working-directory`: Working directory (default: `"."`)
|
||||
- `phpstan-level`: PHPStan level (default: `"5"`)
|
||||
|
||||
See `docs/REUSABLE_WORKFLOWS.md` lines 177-250 for template.
|
||||
|
||||
#### 2. `reusable-joomla-testing.yml`
|
||||
|
||||
Location: `MokoStandards/.github/workflows/reusable-joomla-testing.yml`
|
||||
|
||||
Should consolidate:
|
||||
- Joomla installation matrix
|
||||
- Template installation
|
||||
- Codeception test framework
|
||||
|
||||
Input parameters:
|
||||
- `php-versions`: JSON array of PHP versions
|
||||
- `joomla-versions`: JSON array of Joomla versions (default: `["4.4", "5.0", "5.1"]`)
|
||||
- `template-path`: Path to template files (default: `"src"`)
|
||||
|
||||
#### 3. `reusable-ci-validation.yml`
|
||||
|
||||
Location: `MokoStandards/.github/workflows/reusable-ci-validation.yml`
|
||||
|
||||
Should consolidate:
|
||||
- Manifest validation
|
||||
- XML well-formedness checks
|
||||
- Workflow validation
|
||||
- Python validation scripts
|
||||
|
||||
Input parameters:
|
||||
- `validation-scripts-path`: Path to validation scripts (default: `"scripts/validate"`)
|
||||
|
||||
### Phase 2: Update Project Workflows to Call Reusable Workflows ⚠️ TODO
|
||||
|
||||
Once the reusable workflows are created in MokoStandards, update the project workflows:
|
||||
|
||||
#### Updated `php_quality.yml`
|
||||
|
||||
```yaml
|
||||
name: PHP Code Quality
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- dev/**
|
||||
- rc/**
|
||||
- version/**
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- dev/**
|
||||
- rc/**
|
||||
- version/**
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
quality:
|
||||
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-php-quality.yml@v1
|
||||
with:
|
||||
php-versions: '["8.0", "8.1", "8.2", "8.3"]'
|
||||
php-extensions: 'mbstring, xml, ctype, json, zip'
|
||||
working-directory: '.'
|
||||
phpstan-level: '5'
|
||||
secrets: inherit
|
||||
```
|
||||
|
||||
**Result:** ~15 lines (down from 174 lines) - **91% reduction**
|
||||
|
||||
#### Updated `joomla_testing.yml`
|
||||
|
||||
```yaml
|
||||
name: Joomla Testing
|
||||
|
||||
on:
|
||||
push:
|
||||
|
The documented line count for php_quality.yml (28 lines) doesn't match the actual file size of 29 lines. This should be updated to reflect the accurate count for consistency with the actual workflow file. The documented line count for php_quality.yml (28 lines) doesn't match the actual file size of 29 lines. This should be updated to reflect the accurate count for consistency with the actual workflow file.
|
||||
branches:
|
||||
- main
|
||||
- dev/**
|
||||
- rc/**
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- dev/**
|
||||
- rc/**
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
testing:
|
||||
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-joomla-testing.yml@v1
|
||||
with:
|
||||
php-versions: '["8.0", "8.1", "8.2", "8.3"]'
|
||||
joomla-versions: '["4.4", "5.0", "5.1"]'
|
||||
template-path: 'src'
|
||||
secrets: inherit
|
||||
```
|
||||
|
||||
**Result:** ~17 lines (down from 270 lines) - **94% reduction**
|
||||
|
||||
#### Updated `ci.yml`
|
||||
|
||||
```yaml
|
||||
name: Continuous Integration
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
The documented line count for joomla_testing.yml (25 lines) doesn't match the actual file size of 26 lines. This should be updated to reflect the accurate count for consistency with the actual workflow file. The documented line count for joomla_testing.yml (25 lines) doesn't match the actual file size of 26 lines. This should be updated to reflect the accurate count for consistency with the actual workflow file.
|
||||
- dev/**
|
||||
- rc/**
|
||||
- version/**
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- dev/**
|
||||
- rc/**
|
||||
- version/**
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
validation:
|
||||
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-ci-validation.yml@v1
|
||||
with:
|
||||
validation-scripts-path: 'scripts/validate'
|
||||
secrets: inherit
|
||||
```
|
||||
|
||||
**Result:** ~18 lines (down from 82 lines) - **78% reduction**
|
||||
|
||||
### Phase 3: Benefits After Migration
|
||||
|
||||
**Before (Current State):**
|
||||
- 3 workflow files: 526 total lines
|
||||
- Duplicated logic across projects
|
||||
- Maintenance burden on each project
|
||||
- Inconsistent standards
|
||||
|
||||
**After (MokoStandards Strategy):**
|
||||
- 3 caller files: ~50 total lines (**90% reduction**)
|
||||
- Shared, reusable workflows
|
||||
|
The documented line count for ci.yml (25 lines) doesn't match the actual file size of 26 lines. This should be updated to reflect the accurate count for consistency with the actual workflow file. The documented line count for ci.yml (25 lines) doesn't match the actual file size of 26 lines. This should be updated to reflect the accurate count for consistency with the actual workflow file.
|
||||
- Centralized maintenance
|
||||
- Consistent organization-wide standards
|
||||
- Easy to propagate improvements
|
||||
|
||||
## Action Items
|
||||
|
||||
### For MokoStandards Repository Maintainers
|
||||
|
||||
- [ ] Create `reusable-php-quality.yml` in MokoStandards
|
||||
- [ ] Create `reusable-joomla-testing.yml` in MokoStandards
|
||||
- [ ] Create `reusable-ci-validation.yml` in MokoStandards
|
||||
|
The documented total line count (78 lines) doesn't match the actual total of 81 lines (ci.yml: 26 + php_quality.yml: 29 + joomla_testing.yml: 26). This should be updated to reflect the accurate total for consistency. The documented total line count (78 lines) doesn't match the actual total of 81 lines (ci.yml: 26 + php_quality.yml: 29 + joomla_testing.yml: 26). This should be updated to reflect the accurate total for consistency.
|
||||
- [ ] Tag release (e.g., `v1.0.0`) for version stability
|
||||
- [ ] Document usage in MokoStandards README
|
||||
|
||||
### For moko-cassiopeia Project
|
||||
|
||||
- [ ] Wait for reusable workflows to be available in MokoStandards
|
||||
- [ ] Update `php_quality.yml` to call reusable workflow
|
||||
- [ ] Update `joomla_testing.yml` to call reusable workflow
|
||||
- [ ] Update `ci.yml` to call reusable workflow
|
||||
- [ ] Test all workflows work correctly
|
||||
- [ ] Update `WORKFLOW_GUIDE.md` to reflect new architecture
|
||||
|
||||
## References
|
||||
|
||||
- **Current Project Workflows:** `.github/workflows/`
|
||||
- **MokoStandards Repository:** https://github.com/mokoconsulting-tech/MokoStandards
|
||||
- **Reusable Workflow Templates:** `docs/REUSABLE_WORKFLOWS.md`
|
||||
- **Migration Plan:** `docs/CI_MIGRATION_PLAN.md`
|
||||
|
This checklist item is marked as complete (crossed off with strikethrough), but the reusable workflows don't exist yet in the MokoStandards repository. This contradicts line 14 which clearly states the workflows "need to be created in the MokoStandards repository for the workflows to function." The strikethrough and completion marker should be removed from this line item since the dependency is still pending. This checklist item is marked as complete (crossed off with strikethrough), but the reusable workflows don't exist yet in the MokoStandards repository. This contradicts line 14 which clearly states the workflows "need to be created in the MokoStandards repository for the workflows to function." The strikethrough and completion marker should be removed from this line item since the dependency is still pending.
```suggestion
- [ ] Wait for reusable workflows to be available in MokoStandards
```
|
||||
- **Migration Checklist:** `docs/MIGRATION_CHECKLIST.md`
|
||||
|
||||
## Timeline
|
||||
|
The documented line counts in the checklist items don't match the actual file sizes. The correct values should be: php_quality.yml (29 lines, not 28), joomla_testing.yml (26 lines, not 25), and ci.yml (26 lines, not 25). Please update for accuracy. The documented line counts in the checklist items don't match the actual file sizes. The correct values should be: php_quality.yml (29 lines, not 28), joomla_testing.yml (26 lines, not 25), and ci.yml (26 lines, not 25). Please update for accuracy.
|
||||
|
||||
**Current:** Workflows reverted to original state (3 separate files)
|
||||
|
||||
**Next Step:** Create reusable workflows in MokoStandards repository
|
||||
|
||||
**Final Step:** Update project workflows to thin callers
|
||||
|
||||
---
|
||||
|
||||
**Note:** This migration aligns with the documented strategy in `CI_MIGRATION_PLAN.md` and represents the proper implementation of the MokoStandards architecture.
|
||||
@@ -48,11 +48,9 @@ This repository uses GitHub Actions for continuous integration, testing, quality
|
||||
|
||||
**Trigger:** Automatic on push/PR to main, dev/*, rc/*, version/* branches
|
||||
|
||||
**Purpose:** Comprehensive CI pipeline for validation, quality checks, and testing
|
||||
**Purpose:** Validates code quality and repository structure
|
||||
|
||||
**What it does:**
|
||||
|
||||
**Repository Validation:**
|
||||
- ✅ Validates Joomla manifest XML
|
||||
- ✅ Checks XML well-formedness
|
||||
- ✅ Validates GitHub Actions workflows
|
||||
@@ -61,19 +59,6 @@ This repository uses GitHub Actions for continuous integration, testing, quality
|
||||
- ✅ Validates license headers
|
||||
- ✅ Verifies version alignment
|
||||
|
||||
**PHP Code Quality:**
|
||||
- 🔍 PHPStan static analysis (level 5)
|
||||
- 📏 PHP_CodeSniffer with PSR-12 standards
|
||||
- ✔️ PHP 8.0+ compatibility checks
|
||||
- **Matrix:** PHP 8.0, 8.1, 8.2, 8.3
|
||||
|
||||
**Joomla Integration Testing:**
|
||||
- 📦 Downloads and installs Joomla (4.4, 5.0, 5.1)
|
||||
- 🔧 Installs template into Joomla
|
||||
- ✅ Validates template installation
|
||||
- 🧪 Runs Codeception tests
|
||||
- **Matrix:** Joomla 4.4/5.0/5.1 × PHP 8.0/8.1/8.2/8.3
|
||||
|
||||
**When to check:** After every commit
|
||||
|
||||
**How to view results:**
|
||||
@@ -81,24 +66,53 @@ This repository uses GitHub Actions for continuous integration, testing, quality
|
||||
# Via GitHub CLI
|
||||
gh run list --workflow=ci.yml --limit 5
|
||||
gh run view <run-id> --log
|
||||
|
||||
# View specific job logs
|
||||
gh run view <run-id> --log --job=<job-id>
|
||||
```
|
||||
|
||||
**How to run checks locally:**
|
||||
```bash
|
||||
# Repository validation
|
||||
python3 scripts/validate/manifest.py
|
||||
python3 scripts/validate/workflows.py
|
||||
### PHP Quality Checks (php_quality.yml)
|
||||
|
||||
# PHP quality checks
|
||||
**Trigger:** Automatic on push/PR to main, dev/*, rc/*, version/* branches
|
||||
|
||||
**Purpose:** Ensures PHP code quality and compatibility
|
||||
|
||||
**What it does:**
|
||||
- 🔍 PHPStan static analysis (level 5)
|
||||
- 📏 PHP_CodeSniffer with PSR-12 standards
|
||||
- ✔️ PHP 8.0+ compatibility checks
|
||||
|
||||
**Matrix:** PHP 8.0, 8.1, 8.2, 8.3
|
||||
|
||||
**When to check:** Before committing PHP changes
|
||||
|
||||
**How to run locally:**
|
||||
```bash
|
||||
# Install tools
|
||||
composer global require "squizlabs/php_codesniffer:^3.0" --with-all-dependencies
|
||||
composer global require "phpstan/phpstan:^1.0" --with-all-dependencies
|
||||
|
||||
# Run checks
|
||||
phpcs --standard=phpcs.xml src/
|
||||
phpstan analyse --configuration=phpstan.neon
|
||||
```
|
||||
|
||||
# Joomla testing (see docs/JOOMLA_DEVELOPMENT.md)
|
||||
### Joomla Testing (joomla_testing.yml)
|
||||
|
||||
**Trigger:** Automatic on push/PR to main, dev/*, rc/* branches
|
||||
|
||||
**Purpose:** Tests template compatibility with Joomla versions
|
||||
|
||||
**What it does:**
|
||||
- 📦 Downloads and installs Joomla (4.4, 5.0, 5.1)
|
||||
- 🔧 Installs template into Joomla
|
||||
- ✅ Validates template installation
|
||||
- 🧪 Runs Codeception tests
|
||||
|
||||
**Matrix:** Joomla 4.4/5.0/5.1 × PHP 8.0/8.1/8.2/8.3
|
||||
|
||||
**When to check:** Before releasing new versions
|
||||
|
||||
**How to test locally:**
|
||||
```bash
|
||||
# See docs/JOOMLA_DEVELOPMENT.md for local testing setup
|
||||
codecept run
|
||||
```
|
||||
|
||||
|
||||
The documented line counts don't match the actual workflow file sizes. According to the list_dir tool, the actual line counts are: ci.yml (26 lines), php_quality.yml (29 lines), and joomla_testing.yml (26 lines), totaling 81 lines, not 78 lines. Please update these numbers to reflect the actual file sizes: ci.yml should be 26 lines (not 25), php_quality.yml should be 29 lines (not 28), and joomla_testing.yml should be 26 lines (not 25).