-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4006037
commit e5230ce
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: CI | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- master | ||
paths-ignore: | ||
- 'README.md' | ||
- 'assets/**' | ||
push: | ||
branches: | ||
- master | ||
|
||
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: Build debug APK and run jvm tests | ||
run: ./gradlew assembleDebug testDebugUnitTest --stacktrace -DskipFormatKtlint | ||
|
||
- name: Upload APK | ||
uses: actions/upload-artifact@v2.3.1 | ||
with: | ||
name: app | ||
path: app/build/outputs/apk/debug/*.apk | ||
|
||
- name: Download a Build Artifact | ||
uses: actions/download-artifact@v2.1.0 | ||
with: | ||
name: app | ||
path: app/build/outputs/apk/debug/*.apk |