From 2d6bd33475f3067e0fd7f6a446ca6657fa337ba4 Mon Sep 17 00:00:00 2001 From: alefvanoon <53198048+alefvanoon@users.noreply.github.com> Date: Mon, 7 Feb 2022 17:33:06 +0000 Subject: [PATCH] Add CI https://github.com/libre-tube/LibreTube/issues/13 --- .github/workflows/ci.yml | 52 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 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 000000000..863ff379b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,52 @@ +name: CI + +on: + workflow_dispatch: + pull_request: + branches: + - master + paths-ignore: + - 'README*.md' + - 'fastlane/**' + - 'assets/**' + - '.github/**/*.md' + push: + branches: + - master + paths-ignore: + - 'README*.md' + - 'fastlane/**' + - 'assets/**' + - '.github/**/*.md' + +jobs: + build-and-test-jvm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: gradle/wrapper-validation-action@v1 + + - name: create and checkout branch + # push events already checked out the branch + if: github.event_name == 'pull_request' + run: git checkout -B ${{ github.head_ref }} + + - name: set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: 11 + distribution: "temurin" + cache: 'gradle' + + - name: Make gradlew executable + run: chmod +x ./gradlew + + + - name: Build debug APK and run jvm tests + run: ./gradlew assembleDebug + + - name: Upload APK + uses: actions/upload-artifact@v2 + with: + name: app + path: app/build/outputs/apk/debug/*.apk