From 5754385089abe3d4156747cb5174d36322e88fbf Mon Sep 17 00:00:00 2001 From: HoussemNasri Date: Sun, 21 Apr 2024 18:55:21 +0100 Subject: [PATCH] Add a workflow to run unit tests --- .github/workflows/build.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0a105bef52..9d799fd2d2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -70,6 +70,26 @@ jobs: - name: Build ${{ inputs.flavour }} Flavour run: ./gradlew ${{ inputs.flavour }} + unit-tests: + runs-on: ubuntu-latest + # to prevent running unit tests twice; on the internal and external workflow. + if: inputs.internal == false + needs: [ build ] + + steps: + - name: Unit tests (Debug) + run: ./gradlew :app:testNoapiX64GeckoGenericDebugUnitTest + ./gradlew :app:testNoapiArm64GeckoGenericDebugUnitTest + + - name: Unit tests (Release) + run: ./gradlew :app:testNoapiX64GeckoGenericReleaseUnitTest + ./gradlew :app:testNoapiArm64GeckoGenericReleaseUnitTest + + deploy: + runs-on: ubuntu-latest + needs: [build, unit-tests] + + steps: - name: Upload APK (without WebXR support) to Artifacts uses: actions/upload-artifact@v4 with: