-
Notifications
You must be signed in to change notification settings - Fork 274
83 lines (75 loc) · 2.19 KB
/
pr-checks.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
name: Pull request CI checks
on: [pull_request]
env:
BUILD_CACHE_AWS_REGION: ${{ secrets.BUILD_CACHE_AWS_REGION }}
BUILD_CACHE_AWS_BUCKET: ${{ secrets.BUILD_CACHE_AWS_BUCKET }}
BUILD_CACHE_AWS_ACCESS_KEY_ID: ${{ secrets.BUILD_CACHE_AWS_ACCESS_KEY_ID }}
BUILD_CACHE_AWS_SECRET_KEY: ${{ secrets.BUILD_CACHE_AWS_SECRET_KEY }}
concurrency:
group: ${{ github.head_ref }}
cancel-in-progress: true
jobs:
lint:
name: ktlint
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/[email protected]
- uses: ./.github/actions/setup-java
- uses: ./.github/actions/gradle-cache
with:
key-prefix: gradle-lint
- name: spotless
run: ./gradlew spotlessCheck --scan
- name: Detekt
if: always()
run: ./gradlew detekt
api_check:
name: API check
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/[email protected]
- uses: ./.github/actions/setup-java
- uses: ./.github/actions/gradle-cache
with:
key-prefix: gradle-APICheck
- name: API check
run: ./gradlew apiCheck --scan
debug_build:
name: Debug build
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/[email protected]
- uses: ./.github/actions/setup-java
- uses: ./.github/actions/gradle-cache
with:
key-prefix: gradle-build
- name: Build
run: ./gradlew assembleDebug --scan
test:
name: Unit tests
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/[email protected]
- uses: ./.github/actions/setup-java
- uses: ./.github/actions/gradle-cache
with:
key-prefix: gradle-test
- name: Unit tests
run: ./scripts/ci-unit-tests.sh
- name: Upload testDebugUnitTest results
uses: actions/[email protected]
if: failure()
with:
name: testDebugUnitTest
path: ./**/build/reports/tests/testDebugUnitTest
rubocop:
name: Rubocop
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: ./.github/actions/setup-ruby
- run: bundle exec fastlane rubocop