diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 005f5bc..1bb9fae 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -1,4 +1,4 @@ -name: build +name: build and test on: pull_request: paths-ignore: @@ -9,6 +9,25 @@ on: jobs: build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: gradle/wrapper-validation-action@v2 + - uses: actions/setup-java@v4 + with: + distribution: "temurin" + java-version: "17" + - uses: gradle/actions/setup-gradle@v3 + + - name: Build the app + run: ./gradlew build + + - uses: actions/upload-artifact@v4 + with: + path: app/build/outputs/apk/debug/app-debug.apk + name: apk + + test: runs-on: ubuntu-latest steps: - name: Delete unnecessary tools to free up some space @@ -22,19 +41,13 @@ jobs: swap-storage: true docker-images: true - - name: Checkout the code - uses: actions/checkout@v4 - - - name: Validate Gradle wrapper - uses: gradle/wrapper-validation-action@v2 - + - uses: actions/checkout@v4 + - uses: gradle/wrapper-validation-action@v2 - uses: actions/setup-java@v4 with: distribution: "temurin" java-version: "17" - - - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 + - uses: gradle/actions/setup-gradle@v3 - name: Enable KVM group perms run: | @@ -53,11 +66,3 @@ jobs: -Dorg.gradle.workers.max=1 \ -Pandroid.testoptions.manageddevices.emulator.gpu=swiftshader_indirect \ --info - - - name: Build the app - run: ./gradlew build - - - uses: actions/upload-artifact@v4 - with: - name: apk - path: app/build/outputs/apk/debug/app-debug.apk