-
Notifications
You must be signed in to change notification settings - Fork 1
100 lines (97 loc) · 3.45 KB
/
code_quality.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Code quality
on:
pull_request:
types: [ synchronize, opened, reopened, ready_for_review ]
permissions: read-all
jobs:
android-lint:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
env:
USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'
- uses: reviewdog/action-setup@v1
- name: Run Android Lint
uses: gradle/gradle-build-action@v2
with:
arguments: |
:pillarbox-analytics:lintDebug
:pillarbox-core-business:lintDebug
:pillarbox-demo:lintProdDebug
:pillarbox-demo-shared:lintDebug
:pillarbox-demo-tv:lintDebug
:pillarbox-player:lintDebug
:pillarbox-player-testutils:lintDebug
:pillarbox-ui:lintDebug
- name: Review Android Lint
uses: dvdandroid/action-android-lint@master
with:
github_token: ${{ secrets.RTS_DEVOPS_GITHUB_TOKEN }}
lint_xml_file: ./build/reports/android-lint.xml
reporter: github-pr-review
- name: Check Android Lint
uses: dvdandroid/action-android-lint@master
with:
github_token: ${{ secrets.RTS_DEVOPS_GITHUB_TOKEN }}
lint_xml_file: ./build/reports/android-lint.xml
reporter: github-pr-check
detekt:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'
- uses: reviewdog/action-setup@v1
- name: Review Detekt
uses: alaegin/[email protected]
with:
github_token: ${{ secrets.RTS_DEVOPS_GITHUB_TOKEN }}
detekt_config: config/detekt/detekt.yml
reviewdog_reporter: github-pr-review
detekt_excludes: "**/build/**,**/.idea/**,**/buildSrc/**,**/androidTest/**,**/test/**,**/resources/**"
- name: Check Detekt
uses: alaegin/[email protected]
with:
github_token: ${{ secrets.RTS_DEVOPS_GITHUB_TOKEN }}
detekt_config: config/detekt/detekt.yml
reviewdog_reporter: github-pr-check
detekt_excludes: "**/build/**,**/.idea/**,**/buildSrc/**,**/androidTest/**,**/test/**,**/resources/**"
android-unit-test:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
env:
USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'
- name: Run Android local Unit Tests
uses: gradle/gradle-build-action@v2
with:
arguments: |
:pillarbox-analytics:testDebugUnitTest
:pillarbox-core-business:testDebugUnitTest
:pillarbox-demo:testProdDebugUnitTest
:pillarbox-demo-shared:testDebugUnitTest
:pillarbox-demo-tv:testDebugUnitTest
:pillarbox-player:testDebugUnitTest
:pillarbox-player-testutils:testDebugUnitTest
:pillarbox-ui:testDebugUnitTest