-
Notifications
You must be signed in to change notification settings - Fork 15
executable file
·63 lines (49 loc) · 1.35 KB
/
pre_check.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
56
57
58
59
60
61
62
63
name: Build lint checker report, unit tests and static code analysis
on:
push:
branches: [ master ]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Java JDK
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build Lint
run: ./gradlew lintDebug
- name: Upload Build Lint Report
uses: actions/upload-artifact@v2
with:
name: report
path: app/build/reports/lint-results-debug.html
test:
needs: [lint]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run Unit Tests
run: ./gradlew test
- name: Upload Unit Test Report
uses: actions/upload-artifact@v2
with:
name: test-report
path: app/build/reports/tests/testDebugUnitTest/
code_analysis:
needs: [test]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Java JDK
uses: actions/setup-java@v1
with:
java-version: 11
- name: Upload Code Anaylysis To SonarCloud
run: ./gradlew build sonarqube --info
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}