From 43106835153a62e1817bb1db0e59171593d66247 Mon Sep 17 00:00:00 2001 From: Dilan Goodwin Date: Fri, 21 Feb 2025 08:50:37 +0000 Subject: [PATCH 1/2] automaticTesting 001: Created GitHub actions workflow for automatic building & testing of application on push/pull to main --- .../workflows/AdnroidApplicationTests.yaml | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/AdnroidApplicationTests.yaml diff --git a/.github/workflows/AdnroidApplicationTests.yaml b/.github/workflows/AdnroidApplicationTests.yaml new file mode 100644 index 0000000..8a9a3bb --- /dev/null +++ b/.github/workflows/AdnroidApplicationTests.yaml @@ -0,0 +1,51 @@ +name: Android UI Tests + +on: + push: + branches: ["master"] + pull_request: + branches: ["master"] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: set up JDK + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'adopt' + cache: gradle + + test: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: set up JDK + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'adopt' + cache: gradle + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew build + + test: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: set up JDK + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'adopt' + cache: gradle + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew assembleUnitTest \ No newline at end of file From 1fab1d989eb384b1934a63bd4363f84ae14a4962 Mon Sep 17 00:00:00 2001 From: Dilan Goodwin Date: Fri, 21 Feb 2025 09:17:37 +0000 Subject: [PATCH 2/2] automaticTesting 002: Updated GitHub actions file for gradle tests --- .../workflows/AdnroidApplicationTests.yaml | 40 +++++++------------ 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/.github/workflows/AdnroidApplicationTests.yaml b/.github/workflows/AdnroidApplicationTests.yaml index 8a9a3bb..2809024 100644 --- a/.github/workflows/AdnroidApplicationTests.yaml +++ b/.github/workflows/AdnroidApplicationTests.yaml @@ -1,4 +1,4 @@ -name: Android UI Tests +name: Android Automatic Testing on: push: @@ -17,35 +17,23 @@ jobs: java-version: '21' distribution: 'adopt' cache: gradle - - test: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: set up JDK - uses: actions/setup-java@v4 - with: - java-version: '21' - distribution: 'adopt' - cache: gradle - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build with Gradle run: ./gradlew build - test: - needs: build + unitTest: + name: Unit Testing runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v4 - - name: set up JDK - uses: actions/setup-java@v4 - with: - java-version: '21' - distribution: 'adopt' - cache: gradle - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - name: Build with Gradle - run: ./gradlew assembleUnitTest \ No newline at end of file + - uses: actions/checkout@v4 + + - name: Setup JVM + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'adopt' + + - name: Unit Testing + run: ./gradlew test \ No newline at end of file