Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: split building and testing into separate jobs #30

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 23 additions & 18 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build
name: build and test
on:
pull_request:
paths-ignore:
Expand All @@ -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
Expand All @@ -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: |
Expand All @@ -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