From c9179ae5befb959aad2ec97c3c2a612cf1809943 Mon Sep 17 00:00:00 2001 From: Matte23 Date: Fri, 11 Sep 2020 15:47:10 +0200 Subject: [PATCH] Setup Github Actions --- .github/workflows/ci.yml | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8aec278 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,45 @@ +name: Android CI + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + test: + # The type of runner that the job will run on + name: Run Unit Tests + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - uses: actions/checkout@v2 + - name: Setup Java JDK + uses: actions/setup-java@v1.4.2 + with: + java-version: 1.8 + - name: Unit tests + run: bash ./gradlew test --stacktrace + - name: Kotlin Linter + uses: vroy/gha-kotlin-linter@v2 + + apk: + name: Generate APK + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Setup Java JDK + uses: actions/setup-java@v1.4.2 + with: + java-version: 1.8 + - name: Build debug APK + run: bash ./gradlew assembleDebug --stacktrace + - name: Upload APK + uses: actions/upload-artifact@v1 + with: + name: app + path: app/build/outputs/apk/debug/app-debug.apk