Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
udenr committed Dec 4, 2024
1 parent c8f3444 commit 82db0ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/android-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ jobs:
submodules: "recursive"
- name: Check if androidTest folder is not empty
run: |
echo "NOT_EMPTY=$([ "$(ls -A BackupApp/src/androidTest)" ] && echo 'true' || echo 'false')"
echo "NOT_EMPTY=$([ "$(ls -A BackupApp/src/androidTest)" ] && echo 'true' || echo 'false')" >> $GITHUB_OUTPUT
echo "NOT_EMPTY=$([ "$(ls -A app/src/androidTest)" ] && echo 'true' || echo 'false')"
echo "NOT_EMPTY=$([ "$(ls -A app/src/androidTest)" ] && echo 'true' || echo 'false')" >> $GITHUB_OUTPUT
id: check-androidTest
- name: Get min and target sdk
if: steps.check-androidTest.outputs.NOT_EMPTY == 'true'
id: get-sdk-version
run: |
echo "MIN_SDK_VERSION=$(cat BackupApp/build.gradle | grep minSdkVersion | rev | cut -d' ' -f 1 | rev)" >> $GITHUB_OUTPUT
echo "TARGET_SDK_VERSION=$(cat BackupApp/build.gradle | grep targetSdkVersion | rev | cut -d' ' -f 1 | rev)" >> $GITHUB_OUTPUT
echo "MIN_SDK_VERSION=$(cat app/build.gradle | grep minSdkVersion | rev | cut -d' ' -f 1 | rev)" >> $GITHUB_OUTPUT
echo "TARGET_SDK_VERSION=$(cat app/build.gradle | grep targetSdkVersion | rev | cut -d' ' -f 1 | rev)" >> $GITHUB_OUTPUT
- name: Get app ID
id: get-app-id
run: |
echo "APP_ID=$(cat BackupApp/build.gradle | grep applicationId | rev | cut -d' ' -f 1 | rev | tr -d '"')" >> $GITHUB_OUTPUT
echo "APP_ID=$(cat app/build.gradle | grep applicationId | rev | cut -d' ' -f 1 | rev | tr -d '"')" >> $GITHUB_OUTPUT
test:
needs: check-if-tests-exist
Expand Down Expand Up @@ -92,7 +92,8 @@ jobs:
adb uninstall ${{needs.check-if-tests-exist.outputs.app-id}} || true
adb uninstall ${{needs.check-if-tests-exist.outputs.app-id}}.test || true
adb uninstall ${{needs.check-if-tests-exist.outputs.app-id}}.androidTest || true
./gradlew :BackupApp:connectedCheck --stacktrace
chmod +x gradlew
./gradlew :app:connectedCheck --stacktrace
adb uninstall ${{needs.check-if-tests-exist.outputs.app-id}} || true
adb uninstall ${{needs.check-if-tests-exist.outputs.app-id}}.test || true
adb uninstall ${{needs.check-if-tests-exist.outputs.app-id}}.androidTest || true
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: lint-results-debug
path: BackupApp/build/reports/lint-results-debug.html
path: app/build/reports/lint-results-debug.html

- name: Build the app
run: bash ./gradlew build --stacktrace
Expand All @@ -64,4 +64,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: debug-apk
path: BackupApp/build/outputs/apk/debug/*.apk
path: app/build/outputs/apk/debug/*.apk

0 comments on commit 82db0ce

Please sign in to comment.