From c4ed825fae32b159bd9ea8e2bab8bb3a73498d0f Mon Sep 17 00:00:00 2001 From: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com> Date: Fri, 30 Oct 2026 15:19:48 -0400 Subject: [PATCH] ci: release lint runs as its own step and reports its own failure --- .github/workflows/build.yml | 11 ++++++++++- tools/release/report-build.sh | 9 +++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bb157e6e96..a59b16ff2c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -622,7 +622,7 @@ jobs: run: | set -o pipefail mkdir -p app/build - ./gradlew lintVitalRelease testReleaseUnitTest --console=plain --info --stacktrace -Drobolectric.logging=stderr -PndkVersion="$NDK_VERSION" 2>&1 | tee app/build/unit-tests.log + ./gradlew testReleaseUnitTest --console=plain --info --stacktrace -Drobolectric.logging=stderr -PndkVersion="$NDK_VERSION" 2>&1 | tee app/build/unit-tests.log - name: Upload unit test diagnostics id: unit-test-diagnostics @@ -637,6 +637,14 @@ jobs: if-no-files-found: ignore retention-days: 14 + - name: Release lint + id: lint + if: always() && steps.apk-upload.outcome == 'success' + env: + DROIDDECK_BUILD_LABEL: ${{ steps.build-label.outputs.label }} + SGDB_API_KEY: ${{ secrets.SGDB_API_KEY }} + run: ./gradlew lintVitalRelease --console=plain -PndkVersion="$NDK_VERSION" + - name: Report on the pull request if: always() && github.event_name == 'pull_request' continue-on-error: true @@ -648,6 +656,7 @@ jobs: UNIT_TEST_OUTCOME: ${{ steps.unit-tests.outcome }} TEST_DIAGNOSTICS_URL: ${{ steps.unit-test-diagnostics.outputs.artifact-url }} APK_OUTCOME: ${{ steps.apk-upload.outcome }} + LINT_OUTCOME: ${{ steps.lint.outcome }} run: bash tools/release/report-build.sh store-tests: diff --git a/tools/release/report-build.sh b/tools/release/report-build.sh index e9888229da..0bede66715 100644 --- a/tools/release/report-build.sh +++ b/tools/release/report-build.sh @@ -7,8 +7,8 @@ MARK="" echo [ -f /tmp/pr-merge.md ] && cat /tmp/pr-merge.md echo - case "$BUILD_OUTCOME:$UNIT_TEST_OUTCOME:$APK_OUTCOME" in - success:success:success) + case "$BUILD_OUTCOME:$UNIT_TEST_OUTCOME:$APK_OUTCOME:${LINT_OUTCOME:-success}" in + success:success:success:success) echo "### Build passed" echo echo "The \`droiddeck-apk\` artifact is [on this run]($RUN_URL), signed with the public test key." @@ -18,6 +18,11 @@ MARK="" echo echo "Fallback: [open **PR Release Publish**]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/workflows/pr-release-publish.yml) on \`main\` and enter PR \`$PR\`." ;; + success:success:success:*) + echo "### ERROR: Release lint failed" + echo + echo "The APK compiled and unit tests passed, but \`lintVitalRelease\` found fatal issues. See [the run]($RUN_URL)." + ;; success:success:*) echo "### APK publication incomplete" echo