mirror of
https://github.com/Matte23/circolapp.git
synced 2025-12-06 07:29:10 +00:00
Setup Github Actions
This commit is contained in:
45
.github/workflows/ci.yml
vendored
Normal file
45
.github/workflows/ci.yml
vendored
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user