From ce510c404c33687e1096d7e3e8ea8678b38cf993 Mon Sep 17 00:00:00 2001 From: "Mr. Z" Date: Wed, 10 Dec 2025 18:59:59 -0500 Subject: [PATCH] sync: update 2 files from source repository --- .github/.env.base | 2 +- .github/workflows/fortress-test-magex.yml | 43 +++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/.github/.env.base b/.github/.env.base index ac9e238..a9b7038 100644 --- a/.github/.env.base +++ b/.github/.env.base @@ -244,7 +244,7 @@ REDIS_CACHE_FORCE_PULL=false # Force pull Redis images even when cache # 🪄 MAGE-X CONFIGURATION # ================================================================================================ -MAGE_X_VERSION=v1.8.13 # https://github.com/mrz1836/mage-x/releases +MAGE_X_VERSION=v1.8.14 # https://github.com/mrz1836/mage-x/releases MAGE_X_USE_LOCAL=false # Use local version for development MAGE_X_AUTO_DISCOVER_BUILD_TAGS=true # Enable auto-discovery of build tags MAGE_X_AUTO_DISCOVER_BUILD_TAGS_EXCLUDE=race,custom # Comma-separated list of tags to exclude diff --git a/.github/workflows/fortress-test-magex.yml b/.github/workflows/fortress-test-magex.yml index 1fb0293..96081f3 100644 --- a/.github/workflows/fortress-test-magex.yml +++ b/.github/workflows/fortress-test-magex.yml @@ -68,6 +68,7 @@ jobs: .mage.yaml go.mod ${{ env.GO_SUM_FILE }} + magefiles/ # -------------------------------------------------------------------- # Setup MAGE-X using the reusable composite action @@ -156,6 +157,7 @@ jobs: "lint" "metrics:coverage" "metrics:loc" + "metrics:mage" "release" "release:validate" "test" @@ -206,6 +208,37 @@ jobs: echo "" echo "✅ MAGE-X verification completed successfully." + # -------------------------------------------------------------------- + # Collect Mage Metrics + # -------------------------------------------------------------------- + - name: 📊 Collect Mage Metrics + id: mage-metrics + run: | + set -euo pipefail + echo "📋 Running magex metrics:mage..." + + # Run magex metrics:mage and capture output + METRICS_OUTPUT=$(magex metrics:mage 2>&1 || true) + echo "$METRICS_OUTPUT" + + # Parse directory found status + if echo "$METRICS_OUTPUT" | grep -q "Magefiles Directory Found: ✅"; then + echo "directory-found=true" >> $GITHUB_OUTPUT + else + echo "directory-found=false" >> $GITHUB_OUTPUT + fi + + # Parse total functions count + TOTAL_FUNCTIONS=$(echo "$METRICS_OUTPUT" | grep -oE "Total functions found: [0-9]+" | grep -oE "[0-9]+" || echo "0") + echo "total-functions=$TOTAL_FUNCTIONS" >> $GITHUB_OUTPUT + + # Count number of mage files (lines in table excluding header) + FILE_COUNT=$(echo "$METRICS_OUTPUT" | { grep -E "^\| magefiles/" || true; } | wc -l | tr -d ' ') + echo "file-count=$FILE_COUNT" >> $GITHUB_OUTPUT + + echo "" + echo "✅ Mage metrics collected successfully." + # -------------------------------------------------------------------- # Summary of MAGE-X verification # -------------------------------------------------------------------- @@ -227,6 +260,16 @@ jobs: echo "| **Missing Commands** | ${{ steps.verify-magex.outputs.missing }} |" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY + # Mage Metrics Section + echo "### 📁 Mage Metrics" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "| Metric | Value |" >> $GITHUB_STEP_SUMMARY + echo "|---|---|" >> $GITHUB_STEP_SUMMARY + echo "| **Magefiles Directory** | ${{ steps.mage-metrics.outputs.directory-found == 'true' && '✅ Found' || '❌ Not Found' }} |" >> $GITHUB_STEP_SUMMARY + echo "| **Mage Files** | ${{ steps.mage-metrics.outputs.file-count }} |" >> $GITHUB_STEP_SUMMARY + echo "| **Total Functions** | ${{ steps.mage-metrics.outputs.total-functions }} |" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + if [[ "${{ steps.verify-magex.outputs.missing }}" != "0" ]]; then echo "🚨 **Missing Commands:** ${{ steps.verify-magex.outputs.missing_commands }}" >> $GITHUB_STEP_SUMMARY else