Build with Github actions

This commit is contained in:
Hannes Achleitner 2020-05-31 13:01:40 +02:00
parent 1ba7f48fd2
commit c978f50dc0
2 changed files with 144 additions and 0 deletions

59
.github/stale.yml vendored Normal file
View file

@ -0,0 +1,59 @@
# Configuration for probot-stale - https://github.com/probot/stale
# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 360
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 90
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
onlyLabels: []
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
- pinned
# Set to true to ignore issues in a project (defaults to false)
exemptProjects: false
# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: false
# Set to true to ignore issues with an assignee (defaults to false)
exemptAssignees: false
# Label to use when marking as stale
staleLabel: "stale"
# Comment to post when marking as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. Please comment here if it is still valid so that we can
reprioritize. Thank you!
# Comment to post when removing the stale label.
# unmarkComment: >
# Your comment here.
# Comment to post when closing a stale Issue or Pull Request.
closeComment: >
Closing this. Please reopen if you believe it should be addressed. Thank you for your contribution.
# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 20
# Limit to only `issues` or `pulls`
# only: issues
# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
# pulls:
# daysUntilStale: 30
# markComment: >
# This pull request has been automatically marked as stale because it has not had
# recent activity. It will be closed if no further activity occurs. Thank you
# for your contributions.
# issues:
# exemptLabels:
# - confirmed

View file

@ -0,0 +1,85 @@
name: CI
on:
push:
branches:
- master
- cleanup-bc
pull_request:
branches:
- master
- cleanup-bc
jobs:
BuildAndTest:
name: Build and Test on JDK ${{ matrix.java_version }}
runs-on: macOS-latest
strategy:
matrix:
java_version: [1.8]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0 # 0 indicates all history
- name: Install JDK ${{ matrix.java_version }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java_version }}
- name: Install Android SDK
uses: malinskiy/action-android/install-sdk@release/0.1.0
- name: Build project
run: ./gradlew assemble
- name: Run tests
run: ./gradlew test
- name: Archive UnitTest report
uses: actions/upload-artifact@v2
if: failure()
with:
name: UnitTest-report
path: ${{ github.workspace }}/**/build/reports/tests/testDebugUnitTest
Check:
name: Check
runs-on: macOS-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0 # 0 indicates all history
- name: Install JDK ${{ matrix.java_version }}
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Install Android SDK
uses: malinskiy/action-android/install-sdk@release/0.1.0
- name: Build project
run: ./gradlew lint
Espresso:
runs-on: macOS-latest
continue-on-error: true
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Install Android SDK
uses: malinskiy/action-android/install-sdk@release/0.1.0
- name: Run instrumentation tests
uses: malinskiy/action-android/emulator-run-cmd@release/0.1.0
with:
cmd: ./gradlew connectedFdroidDebugAndroidTest
api: 28
tag: default
abi: x86
- name: Archive Espresso results
uses: actions/upload-artifact@v2
if: failure()
with:
name: Espresso-report
path: ./**/build/reports/androidTests/connected