ci: enforce store-listing metadata length limits (#5854)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
James Rich
2026-06-18 14:45:48 -05:00
committed by GitHub
parent b8ab53e712
commit 1650d219c2
3 changed files with 112 additions and 1 deletions

View File

@@ -96,6 +96,24 @@ jobs:
print('check-changes filter is aligned with settings.gradle module roots.')
PY
# 1c. STORE METADATA: Enforce store-listing length limits (e.g. the F-Droid /
# Play 80-char short_description). These files are mirrored from Crowdin, so
# this guard intentionally runs on the translation-sync PRs too (no
# scheduled-updates / l10n_main skip) -- that is where overlength translations
# land. It is a standalone lightweight job, decoupled from the Gradle build so
# a one-line translation fix never triggers a full assemble/test cycle.
check-metadata:
name: Check Store Metadata
if: github.repository == 'meshtastic/Meshtastic-Android'
runs-on: ubuntu-24.04-arm
timeout-minutes: 5
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- name: Validate store listing metadata lengths
run: python3 scripts/check-metadata-length.py
# 2. VALIDATION & BUILD: Delegate to reusable-check.yml
# We disable coverage and desktop builds for PRs to keep feedback fast
# (< 10 mins). Desktop compilation is already covered by the :desktopApp:test
@@ -117,7 +135,7 @@ jobs:
runs-on: ubuntu-24.04-arm
timeout-minutes: 5
permissions: {}
needs: [check-changes, verify-check-changes-filter, validate-and-build]
needs: [check-changes, verify-check-changes-filter, check-metadata, validate-and-build]
if: always()
steps:
- name: Check Workflow Status
@@ -127,6 +145,11 @@ jobs:
exit 1
fi
if [[ "${{ needs.check-metadata.result }}" == "failure" || "${{ needs.check-metadata.result }}" == "cancelled" ]]; then
echo "::error::Store metadata length check failed"
exit 1
fi
# If changes were detected but build failed, fail the status check
if [[ "${{ needs.check-changes.outputs.android }}" == "true" && ("${{ needs.validate-and-build.result }}" == "failure" || "${{ needs.validate-and-build.result }}" == "cancelled") ]]; then
echo "::error::Android Check failed"

View File

@@ -101,6 +101,15 @@ jobs:
- name: Fix file permissions
run: sudo chown -R $USER:$USER .
# Early warning for overlength store-listing translations just pulled from
# Crowdin. Non-blocking on purpose: a hard failure here would abort the
# firmware/hardware/graphs job and stop the PR from being created. The
# hard gate is the check-metadata job in pull-request.yml, which runs
# against the PR this workflow opens.
- name: Check store metadata lengths
continue-on-error: true
run: python3 scripts/check-metadata-length.py
- name: Gradle Setup
uses: ./.github/actions/gradle-setup
with: