-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (50 loc) · 1.42 KB
/
android-code-quality-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
name: 'Code Quality Check'
on:
pull_request:
branches:
- main
- develop
concurrency:
# New commit on branch cancels running workflows of the same branch
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
lint:
name: Perform static analysis
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Prepare environment
uses: ./.github/actions/prepare-android-env
- name: Run lint
run: ./gradlew lintDebugAll
- name: Run detekt
run: ./gradlew detektAll
- name: Run spotless
run: ./gradlew spotlessCheckAll
- name: Upload static analysis reports
if: success() || failure()
uses: actions/upload-artifact@v2
with:
name: static_analysis.zip
path: |
**/build/reports/**
!**/build/reports/tests/**
unit-test:
name: Perform Unit Testing
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Prepare environment
uses: ./.github/actions/prepare-android-env
- name: Run tests
run: ./gradlew test
- name: Upload test reports
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: test-reports.zip
path: |
**/build/reports/tests/**