0
0
mirror of https://github.com/mediathekview/zapp.git synced 2024-09-20 04:12:14 +02:00

Switching from travis-ci to GitHub actions

This commit is contained in:
Nicklas Wiegandt 2020-12-21 17:57:40 +01:00 committed by Christine Coenen
parent 5806ba5000
commit 1e711bb980
2 changed files with 33 additions and 31 deletions

33
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Build an test
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Cache gradle and sdk
uses: actions/cache@v2
env:
cache-name: Cache Gradle and SDK
with:
path: |
${{ github.workspace }}/.opt/cache/gradle/wrapper
${{ github.workspace }}/.opt/cache/gradle/caches
${{ github.workspace }}/.opt/cache/gradle/caches
${{ github.workspace }}/.opt/sdk
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/wrapper/gradle-wrapper.properties', '**/build.gradle') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build test -Pci

View File

@ -1,31 +0,0 @@
language: android
dist: trusty
android:
components:
# Uncomment the lines below if you want to
# use the latest revision of Android SDK Tools
- tools
- platform-tools
# The BuildTools version used by your project
- build-tools-29.0.3
# The SDK version used to compile your project
- android-29
# Additional components
- extra-google-m2repository
- extra-android-m2repository
# Gradle caching
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache
script:
- ./gradlew build test -Pci