|
1 | 1 | name: Pull request CI checks |
2 | 2 |
|
3 | | -on: [pull_request] |
4 | | - |
5 | | -env: |
6 | | - BUILD_CACHE_AWS_REGION: ${{ secrets.BUILD_CACHE_AWS_REGION }} |
7 | | - BUILD_CACHE_AWS_BUCKET: ${{ secrets.BUILD_CACHE_AWS_BUCKET }} |
8 | | - BUILD_CACHE_AWS_ACCESS_KEY_ID: ${{ secrets.BUILD_CACHE_AWS_ACCESS_KEY_ID }} |
9 | | - BUILD_CACHE_AWS_SECRET_KEY: ${{ secrets.BUILD_CACHE_AWS_SECRET_KEY }} |
10 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
11 | | - GITHUB_PR_NUM: ${{ github.event.pull_request.number }} |
| 3 | +on: [ pull_request ] |
12 | 4 |
|
13 | 5 | concurrency: |
14 | 6 | group: ${{ github.head_ref }} |
15 | 7 | cancel-in-progress: true |
16 | 8 |
|
17 | 9 | jobs: |
18 | | - lint: |
19 | | - name: ktlint |
| 10 | + base-android-ci: |
| 11 | + uses: GetStream/stream-build-conventions-android/.github/workflows/[email protected] |
| 12 | + secrets: inherit |
| 13 | + |
| 14 | + detekt: |
| 15 | + name: Detekt |
20 | 16 | runs-on: ubuntu-22.04 |
21 | 17 | steps: |
22 | | - - name: Check out code |
23 | | - |
24 | | - - uses: GetStream/android-ci-actions/actions/setup-java@main |
25 | | - - uses: GetStream/android-ci-actions/actions/gradle-cache@main |
26 | | - with: |
27 | | - cache-name: gradle-lint |
28 | | - - name: spotless |
29 | | - run: ./gradlew spotlessCheck --scan |
| 18 | + |
| 19 | + - uses: GetStream/stream-build-conventions-android/.github/actions/setup-gradle@main |
30 | 20 | - name: Detekt |
31 | | - if: always() |
32 | 21 | run: ./gradlew detekt |
33 | 22 |
|
34 | | - api_check: |
35 | | - name: API check |
36 | | - runs-on: ubuntu-22.04 |
37 | | - steps: |
38 | | - - name: Check out code |
39 | | - |
40 | | - - uses: GetStream/android-ci-actions/actions/setup-java@main |
41 | | - - uses: GetStream/android-ci-actions/actions/gradle-cache@main |
42 | | - with: |
43 | | - cache-name: gradle-APICheck |
44 | | - - name: API check |
45 | | - run: ./gradlew apiCheck --scan |
46 | | - |
47 | | - debug_build: |
48 | | - name: Debug build |
49 | | - runs-on: ubuntu-22.04 |
50 | | - steps: |
51 | | - - name: Check out code |
52 | | - |
53 | | - - uses: GetStream/android-ci-actions/actions/setup-java@main |
54 | | - - uses: GetStream/android-ci-actions/actions/gradle-cache@main |
55 | | - with: |
56 | | - cache-name: gradle-build |
57 | | - - name: Build |
58 | | - run: ./gradlew assembleDebug --scan |
59 | | - |
60 | | - test: |
61 | | - name: Unit tests |
62 | | - runs-on: ubuntu-22.04 |
63 | | - steps: |
64 | | - - name: Check out code |
65 | | - uses: actions/checkout@v4 |
66 | | - with: |
67 | | - fetch-depth: 0 # fetch all history for sonar analysis |
68 | | - - uses: GetStream/android-ci-actions/actions/setup-java@main |
69 | | - - uses: GetStream/android-ci-actions/actions/gradle-cache@main |
70 | | - with: |
71 | | - cache-name: gradle-test |
72 | | - - name: Unit tests |
73 | | - run: ./scripts/ci-unit-tests.sh |
74 | | - - name: Upload test results |
75 | | - |
76 | | - if: failure() |
77 | | - with: |
78 | | - name: testResults |
79 | | - path: ./**/build/reports/tests/** |
80 | | - - uses: GetStream/android-ci-actions/actions/setup-ruby@main |
81 | | - - name: Sonar |
82 | | - run: bundle exec fastlane run_sonar_analysis |
83 | | - env: |
84 | | - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
85 | | - |
86 | 23 | rubocop: |
87 | 24 | name: Rubocop |
88 | 25 | runs-on: ubuntu-22.04 |
|
0 commit comments