mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-26 00:06:02 +00:00
ci: release lint runs as its own step and reports its own failure
This commit is contained in:
1 parent
4bc2aebce6
commit
c4ed825fae
2 files changed
+17
-3
No files matched your search
@@ -622,7 +622,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
mkdir -p app/build
|
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
|
- name: Upload unit test diagnostics
|
||||||
id: unit-test-diagnostics
|
id: unit-test-diagnostics
|
||||||
@@ -637,6 +637,14 @@ jobs:
|
|||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
retention-days: 14
|
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
|
- name: Report on the pull request
|
||||||
if: always() && github.event_name == 'pull_request'
|
if: always() && github.event_name == 'pull_request'
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
@@ -648,6 +656,7 @@ jobs:
|
|||||||
UNIT_TEST_OUTCOME: ${{ steps.unit-tests.outcome }}
|
UNIT_TEST_OUTCOME: ${{ steps.unit-tests.outcome }}
|
||||||
TEST_DIAGNOSTICS_URL: ${{ steps.unit-test-diagnostics.outputs.artifact-url }}
|
TEST_DIAGNOSTICS_URL: ${{ steps.unit-test-diagnostics.outputs.artifact-url }}
|
||||||
APK_OUTCOME: ${{ steps.apk-upload.outcome }}
|
APK_OUTCOME: ${{ steps.apk-upload.outcome }}
|
||||||
|
LINT_OUTCOME: ${{ steps.lint.outcome }}
|
||||||
run: bash tools/release/report-build.sh
|
run: bash tools/release/report-build.sh
|
||||||
|
|
||||||
store-tests:
|
store-tests:
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ MARK="<!-- droiddeck-pr-build -->"
|
|||||||
echo
|
echo
|
||||||
[ -f /tmp/pr-merge.md ] && cat /tmp/pr-merge.md
|
[ -f /tmp/pr-merge.md ] && cat /tmp/pr-merge.md
|
||||||
echo
|
echo
|
||||||
case "$BUILD_OUTCOME:$UNIT_TEST_OUTCOME:$APK_OUTCOME" in
|
case "$BUILD_OUTCOME:$UNIT_TEST_OUTCOME:$APK_OUTCOME:${LINT_OUTCOME:-success}" in
|
||||||
success:success:success)
|
success:success:success:success)
|
||||||
echo "### Build passed"
|
echo "### Build passed"
|
||||||
echo
|
echo
|
||||||
echo "The \`droiddeck-apk\` artifact is [on this run]($RUN_URL), signed with the public test key."
|
echo "The \`droiddeck-apk\` artifact is [on this run]($RUN_URL), signed with the public test key."
|
||||||
@@ -18,6 +18,11 @@ MARK="<!-- droiddeck-pr-build -->"
|
|||||||
echo
|
echo
|
||||||
echo "Fallback: [open **PR Release Publish**]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/workflows/pr-release-publish.yml) on \`main\` and enter PR \`$PR\`."
|
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:*)
|
success:success:*)
|
||||||
echo "### APK publication incomplete"
|
echo "### APK publication incomplete"
|
||||||
echo
|
echo
|
||||||
|
|||||||
Reference in new issue
Block a user