-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.16 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Build main
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Checkout code
with:
fetch-depth: 2 # Checkout HEAD^
- name: Setup JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: gradle
- name: Check for changes in app directory
id: check-changes
run: |
CHANGED=$(git diff --name-only HEAD^...HEAD -- app/)
if [ -z "$CHANGED" ]; then
echo "No changes in app/ directory."
echo "skip-build-app=true" >> $GITHUB_ENV
fi
- name: Build and test SDK
if: env.skip-build-app == 'true'
run: ./gradlew unleashandroidsdk:build unleashandroidsdk:jacocoTestReport
- name: Build and test all
if: env.skip-build-app != 'true'
run: ./gradlew build jacocoTestReport
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
allow-empty: true
base-path: unleashandroidsdk/src/main/java