Skip to content

Commit 4c4fcb5

Browse files
committed
Use Android CI from common workflows
1 parent 5e4c05f commit 4c4fcb5

File tree

3 files changed

+10
-74
lines changed

3 files changed

+10
-74
lines changed

.github/workflows/build-and-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
fetch-depth: 0 # fetch all history for sonar analysis
4242
- uses: GetStream/android-ci-actions/actions/setup-java@main
4343
- name: Unit tests
44-
run: ./scripts/ci-unit-tests.sh
44+
run: ./gradlew testCoverage
4545
- name: Upload test results
4646
uses: actions/[email protected]
4747
if: failure()

.github/workflows/pr-checks.yml

Lines changed: 9 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,25 @@
11
name: Pull request CI checks
22

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 ]
124

135
concurrency:
146
group: ${{ github.head_ref }}
157
cancel-in-progress: true
168

179
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
2016
runs-on: ubuntu-22.04
2117
steps:
22-
- name: Check out code
23-
uses: actions/[email protected]
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+
- uses: actions/[email protected]
19+
- uses: GetStream/stream-build-conventions-android/.github/actions/setup-gradle@main
3020
- name: Detekt
31-
if: always()
3221
run: ./gradlew detekt
3322

34-
api_check:
35-
name: API check
36-
runs-on: ubuntu-22.04
37-
steps:
38-
- name: Check out code
39-
uses: actions/[email protected]
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-
uses: actions/[email protected]
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-
uses: actions/[email protected]
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-
8623
rubocop:
8724
name: Rubocop
8825
runs-on: ubuntu-22.04

scripts/ci-unit-tests.sh

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)