mirror of https://github.com/iSoron/uhabits.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.2 KiB
57 lines
1.2 KiB
name: Build & Test
|
|
on:
|
|
pull_request:
|
|
paths-ignore:
|
|
- '**.md'
|
|
push:
|
|
paths-ignore:
|
|
- '**.md'
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out source code
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Install Java Development Kit 1.8
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 1.8
|
|
|
|
- name: Build & Run small tests
|
|
run: ./build.sh build
|
|
|
|
- name: Upload APK
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: debug-apk
|
|
path: uhabits-android/build/*apk
|
|
|
|
- name: Upload build outputs
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: build
|
|
path: uhabits-android/build/outputs/
|
|
|
|
test:
|
|
needs: build
|
|
runs-on: macOS-latest
|
|
strategy:
|
|
matrix:
|
|
api-level: [23, 24, 25, 26, 27, 28, 29]
|
|
steps:
|
|
- name: Check out source code
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Download previous build folder
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: build
|
|
path: uhabits-android/build/outputs/
|
|
|
|
- name: Run medium tests
|
|
uses: ReactiveCircus/android-emulator-runner@v2
|
|
with:
|
|
api-level: ${{ matrix.api-level }}
|
|
script: ./build.sh medium-tests
|