From 57a5bea5475c7d0945e3063dbf3c75775a780565 Mon Sep 17 00:00:00 2001 From: Mugunthan <87799495+Micoder-dev@users.noreply.github.com> Date: Tue, 5 Jul 2022 15:34:49 +0530 Subject: [PATCH 1/5] Create BuildTest.yml --- .github/workflows/BuildTest.yml | 98 +++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 .github/workflows/BuildTest.yml diff --git a/.github/workflows/BuildTest.yml b/.github/workflows/BuildTest.yml new file mode 100644 index 0000000..0d9697c --- /dev/null +++ b/.github/workflows/BuildTest.yml @@ -0,0 +1,98 @@ +name: Build and Test + +on: + workflow_dispatch: + +jobs: + + local_test_job: + name: Running Local Tests + runs-on: ubuntu-latest + continue-on-error: true + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Print Java version + run: javac -version + - name: Change wrapper permissions + run: chmod +x ./gradlew + - name: Restore Cache + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-gradle- + + - name: Run Debug Tests + run: ./gradlew testDebugUnitTest --continue + - name: Upload Test Reports + if: ${{ always() }} + uses: actions/upload-artifact@v2 + with: + name: test-reports + path: '**/build/reports/tests/' + + android_test_job: + name: Android Tests + runs-on: macos-latest + continue-on-error: true + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Change wrapper permissions + run: chmod +x ./gradlew + - name: Restore Cache + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Instrumentation Tests + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: 29 + script: ./gradlew connectedAndroidTest + + - name: Upload Android Test Reports + if: ${{ always() }} + uses: actions/upload-artifact@v2 + with: + name: android-test-reports + path: '**/build/reports/androidTests/' + + build_job: + name: Building the APK + runs-on: ubuntu-latest + continue-on-error: true + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Restore Cache + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Change wrapper permissions + run: chmod +x ./gradlew + - name: Assemble Debug + run: ./gradlew assembleDebug + + - name: Upload APK + uses: actions/upload-artifact@v2 + with: + name: apk + path: app/build/outputs/apk/debug/**.apk From ade324db21536cce914e2de81960519898af4fff Mon Sep 17 00:00:00 2001 From: Mugunthan <87799495+Micoder-dev@users.noreply.github.com> Date: Tue, 5 Jul 2022 15:55:39 +0530 Subject: [PATCH 2/5] Update BuildTest.yml --- .github/workflows/BuildTest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/BuildTest.yml b/.github/workflows/BuildTest.yml index 0d9697c..0da2c49 100644 --- a/.github/workflows/BuildTest.yml +++ b/.github/workflows/BuildTest.yml @@ -95,4 +95,4 @@ jobs: uses: actions/upload-artifact@v2 with: name: apk - path: app/build/outputs/apk/debug/**.apk + path: sample/build/outputs/apk/debug/**.apk From c2c5d8a519cc2d9992ea1ed60fb63893a67aa804 Mon Sep 17 00:00:00 2001 From: Mugunthan <87799495+Micoder-dev@users.noreply.github.com> Date: Mon, 11 Jul 2022 07:54:47 -0700 Subject: [PATCH 3/5] Update BuildTest.yml --- .github/workflows/BuildTest.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/BuildTest.yml b/.github/workflows/BuildTest.yml index 0da2c49..8458841 100644 --- a/.github/workflows/BuildTest.yml +++ b/.github/workflows/BuildTest.yml @@ -46,6 +46,12 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Print Java version + run: javac -version - name: Change wrapper permissions run: chmod +x ./gradlew - name: Restore Cache @@ -95,4 +101,4 @@ jobs: uses: actions/upload-artifact@v2 with: name: apk - path: sample/build/outputs/apk/debug/**.apk + path: app/build/outputs/apk/debug/**.apk From 0c7a079ce36713bc27dc07872de9f4ecd924aa39 Mon Sep 17 00:00:00 2001 From: Mugunthan <87799495+Micoder-dev@users.noreply.github.com> Date: Mon, 11 Jul 2022 08:02:52 -0700 Subject: [PATCH 4/5] Update BuildTest.yml --- .github/workflows/BuildTest.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/BuildTest.yml b/.github/workflows/BuildTest.yml index 8458841..f6741e6 100644 --- a/.github/workflows/BuildTest.yml +++ b/.github/workflows/BuildTest.yml @@ -37,7 +37,7 @@ jobs: uses: actions/upload-artifact@v2 with: name: test-reports - path: '**/build/reports/tests/' + path: 'sample/build/reports/tests/' android_test_job: name: Android Tests @@ -74,7 +74,7 @@ jobs: uses: actions/upload-artifact@v2 with: name: android-test-reports - path: '**/build/reports/androidTests/' + path: 'sample/build/reports/androidTests/' build_job: name: Building the APK @@ -101,4 +101,4 @@ jobs: uses: actions/upload-artifact@v2 with: name: apk - path: app/build/outputs/apk/debug/**.apk + path: sample/build/outputs/apk/debug/**.apk From f54d68989ecb27d81efbd0d32e7b489837714d36 Mon Sep 17 00:00:00 2001 From: Mugunthan Date: Tue, 30 Aug 2022 12:37:39 +0530 Subject: [PATCH 5/5] Update BuildTest.yml --- .github/workflows/BuildTest.yml | 75 +-------------------------------- 1 file changed, 2 insertions(+), 73 deletions(-) diff --git a/.github/workflows/BuildTest.yml b/.github/workflows/BuildTest.yml index f6741e6..ab4b53b 100644 --- a/.github/workflows/BuildTest.yml +++ b/.github/workflows/BuildTest.yml @@ -1,81 +1,10 @@ -name: Build and Test +name: BuildAPK on: workflow_dispatch: jobs: - local_test_job: - name: Running Local Tests - runs-on: ubuntu-latest - continue-on-error: true - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - java-version: 11 - - name: Print Java version - run: javac -version - - name: Change wrapper permissions - run: chmod +x ./gradlew - - name: Restore Cache - uses: actions/cache@v2 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} - restore-keys: | - ${{ runner.os }}-gradle- - - - name: Run Debug Tests - run: ./gradlew testDebugUnitTest --continue - - name: Upload Test Reports - if: ${{ always() }} - uses: actions/upload-artifact@v2 - with: - name: test-reports - path: 'sample/build/reports/tests/' - - android_test_job: - name: Android Tests - runs-on: macos-latest - continue-on-error: true - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - java-version: 11 - - name: Print Java version - run: javac -version - - name: Change wrapper permissions - run: chmod +x ./gradlew - - name: Restore Cache - uses: actions/cache@v2 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} - restore-keys: | - ${{ runner.os }}-gradle- - - name: Instrumentation Tests - uses: reactivecircus/android-emulator-runner@v2 - with: - api-level: 29 - script: ./gradlew connectedAndroidTest - - - name: Upload Android Test Reports - if: ${{ always() }} - uses: actions/upload-artifact@v2 - with: - name: android-test-reports - path: 'sample/build/reports/androidTests/' - build_job: name: Building the APK runs-on: ubuntu-latest @@ -100,5 +29,5 @@ jobs: - name: Upload APK uses: actions/upload-artifact@v2 with: - name: apk + name: FloatingNavigationView-APK path: sample/build/outputs/apk/debug/**.apk