Merge pull request #2556 from hannesa2/Github_CI

Build with Github actions
This commit is contained in:
Dominik Schürmann 2021-03-16 12:31:59 +01:00 committed by GitHub
commit 2cf33fc578
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 147 additions and 33 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

View File

@ -1,33 +0,0 @@
language: android
jdk: oraclejdk8
# force non-container build
sudo: required
android:
components:
- tools
- android-28
- platform-tools
- build-tools-28.0.3
- extra-android-support
- extra-android-m2repository
- sys-img-armeabi-v7a-android-27
licenses:
- 'android-sdk-preview-license-52d11cd2'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'
script:
./gradlew --stacktrace testDebug
- if [ ${TEST} == "android" ]; then
echo no | android create avd --force --name test --target $ANDROID_TARGET --abi $ANDROID_ABI;
emulator -avd test -no-skin -no-audio -no-window &
android-wait-for-emulator;
sleep 10;
adb shell svc power stayon true;
sleep 5;
adb shell input keyevent 82;
./gradlew --stacktrace connectedFdroidDebugAndroidTest -i;
fi

View File

@ -6,4 +6,6 @@
<color name="colorCloseChip">#ababab</color>
<color name="white_transparency">#b9ffffff</color>
<color name="colorAccent">#2196f3</color>
</resources>

View File

@ -1,3 +1,4 @@
android.enableJetifier=true
android.useAndroidX=true
android.jetifier.blacklist=bcprov-jdk15on
org.gradle.jvmargs=-Xms128m -Xmx4096m -XX:+CMSClassUnloadingEnabled