-
-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (46 loc) · 1.52 KB
/
build-and-test.yml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: 'Build and Test'
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
publish:
name: Build and Test
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '19'
- name: Build
run: |
./gradlew :photomanipulator:build
- name: Test
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
script: ./gradlew :photomanipulator:jacocoTestReport
- name: Setup sonarqube
uses: warchant/setup-sonar-scanner@v8
- name: Analyze with SonarCloud
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: sonar-scanner
-Dsonar.projectKey=guhungry_android-photo-manipulator
-Dsonar.projectName=android-photo-manipulator
-Dsonar.organization=guhungry-github
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.token=${{ secrets.SONAR_TOKEN }}
-Dsonar.sources=photomanipulator/src/main
-Dsonar.tests=photomanipulator/src/androidTest,photomanipulator/src/test
-Dsonar.coverage.jacoco.xmlReportPaths=photomanipulator/build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml