Skip to content

Commit 49f5088

Browse files
authored
sync: update 3 files from source repository (#29)
1 parent d882390 commit 49f5088

File tree

3 files changed

+45
-2
lines changed

3 files changed

+45
-2
lines changed

.github/.env.base

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ REDIS_CACHE_FORCE_PULL=false # Force pull Redis images even when cache
244244
# 🪄 MAGE-X CONFIGURATION
245245
# ================================================================================================
246246

247-
MAGE_X_VERSION=v1.8.11 # https://github.com/mrz1836/mage-x/releases
247+
MAGE_X_VERSION=v1.8.14 # https://github.com/mrz1836/mage-x/releases
248248
MAGE_X_USE_LOCAL=false # Use local version for development
249249
MAGE_X_AUTO_DISCOVER_BUILD_TAGS=true # Enable auto-discovery of build tags
250250
MAGE_X_AUTO_DISCOVER_BUILD_TAGS_EXCLUDE=race,custom # Comma-separated list of tags to exclude

.github/workflows/fortress-coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2399,7 +2399,7 @@ jobs:
23992399
# Upload to Codecov
24002400
# --------------------------------------------------------------------
24012401
- name: 📈 Upload coverage to Codecov
2402-
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
2402+
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
24032403
with:
24042404
#file: ./coverage.txt # This is the old format
24052405
files: ./coverage-artifacts/coverage-data/coverage.txt

.github/workflows/fortress-test-magex.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ jobs:
6868
.mage.yaml
6969
go.mod
7070
${{ env.GO_SUM_FILE }}
71+
magefiles/
7172
7273
# --------------------------------------------------------------------
7374
# Setup MAGE-X using the reusable composite action
@@ -156,6 +157,7 @@ jobs:
156157
"lint"
157158
"metrics:coverage"
158159
"metrics:loc"
160+
"metrics:mage"
159161
"release"
160162
"release:validate"
161163
"test"
@@ -206,6 +208,37 @@ jobs:
206208
echo ""
207209
echo "✅ MAGE-X verification completed successfully."
208210
211+
# --------------------------------------------------------------------
212+
# Collect Mage Metrics
213+
# --------------------------------------------------------------------
214+
- name: 📊 Collect Mage Metrics
215+
id: mage-metrics
216+
run: |
217+
set -euo pipefail
218+
echo "📋 Running magex metrics:mage..."
219+
220+
# Run magex metrics:mage and capture output
221+
METRICS_OUTPUT=$(magex metrics:mage 2>&1 || true)
222+
echo "$METRICS_OUTPUT"
223+
224+
# Parse directory found status
225+
if echo "$METRICS_OUTPUT" | grep -q "Magefiles Directory Found: ✅"; then
226+
echo "directory-found=true" >> $GITHUB_OUTPUT
227+
else
228+
echo "directory-found=false" >> $GITHUB_OUTPUT
229+
fi
230+
231+
# Parse total functions count
232+
TOTAL_FUNCTIONS=$(echo "$METRICS_OUTPUT" | grep -oE "Total functions found: [0-9]+" | grep -oE "[0-9]+" || echo "0")
233+
echo "total-functions=$TOTAL_FUNCTIONS" >> $GITHUB_OUTPUT
234+
235+
# Count number of mage files (lines in table excluding header)
236+
FILE_COUNT=$(echo "$METRICS_OUTPUT" | { grep -E "^\| magefiles/" || true; } | wc -l | tr -d ' ')
237+
echo "file-count=$FILE_COUNT" >> $GITHUB_OUTPUT
238+
239+
echo ""
240+
echo "✅ Mage metrics collected successfully."
241+
209242
# --------------------------------------------------------------------
210243
# Summary of MAGE-X verification
211244
# --------------------------------------------------------------------
@@ -227,6 +260,16 @@ jobs:
227260
echo "| **Missing Commands** | ${{ steps.verify-magex.outputs.missing }} |" >> $GITHUB_STEP_SUMMARY
228261
echo "" >> $GITHUB_STEP_SUMMARY
229262
263+
# Mage Metrics Section
264+
echo "### 📁 Mage Metrics" >> $GITHUB_STEP_SUMMARY
265+
echo "" >> $GITHUB_STEP_SUMMARY
266+
echo "| Metric | Value |" >> $GITHUB_STEP_SUMMARY
267+
echo "|---|---|" >> $GITHUB_STEP_SUMMARY
268+
echo "| **Magefiles Directory** | ${{ steps.mage-metrics.outputs.directory-found == 'true' && '✅ Found' || '❌ Not Found' }} |" >> $GITHUB_STEP_SUMMARY
269+
echo "| **Mage Files** | ${{ steps.mage-metrics.outputs.file-count }} |" >> $GITHUB_STEP_SUMMARY
270+
echo "| **Total Functions** | ${{ steps.mage-metrics.outputs.total-functions }} |" >> $GITHUB_STEP_SUMMARY
271+
echo "" >> $GITHUB_STEP_SUMMARY
272+
230273
if [[ "${{ steps.verify-magex.outputs.missing }}" != "0" ]]; then
231274
echo "🚨 **Missing Commands:** ${{ steps.verify-magex.outputs.missing_commands }}" >> $GITHUB_STEP_SUMMARY
232275
else

0 commit comments

Comments
 (0)