-
Notifications
You must be signed in to change notification settings - Fork 15
99 lines (96 loc) · 3.47 KB
/
pr.yml
File metadata and controls
99 lines (96 loc) · 3.47 KB
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
name: PR
on: pull_request
concurrency:
group: ref-${{ github.ref }}
cancel-in-progress: true
jobs:
unit_test:
runs-on: ubuntu-latest-8-vcpu
steps:
- uses: actions/checkout@v5
- name: Setup CI
uses: ./.github/actions/common-setup
with:
gradle-cache-read-only: 'false'
datadog-api-key: ${{ secrets.DATADOG_API_KEY }}
lokalise-id: ${{ secrets.LOKALISE_ID }}
lokalise-token: ${{ secrets.LOKALISE_TOKEN }}
- name: Unit tests
run: ./gradlew test
lint:
runs-on: ubuntu-latest-8-vcpu
steps:
- uses: actions/checkout@v5
- name: Setup CI
uses: ./.github/actions/common-setup
with:
gradle-cache-read-only: 'false'
datadog-api-key: ${{ secrets.DATADOG_API_KEY }}
lokalise-id: ${{ secrets.LOKALISE_ID }}
lokalise-token: ${{ secrets.LOKALISE_TOKEN }}
- run: ./gradlew lint
- uses: yutailang0119/action-android-lint@v5.0.0
with:
report-path: app/build/reports/lint-results-debug.xml
continue-on-error: true
ktlint:
runs-on: ubuntu-latest-8-vcpu
steps:
- uses: actions/checkout@v5
- name: Setup CI
uses: ./.github/actions/common-setup
with:
gradle-cache-read-only: 'false'
datadog-api-key: ${{ secrets.DATADOG_API_KEY }}
lokalise-id: ${{ secrets.LOKALISE_ID }}
lokalise-token: ${{ secrets.LOKALISE_TOKEN }}
- name: run ktlint from gradle
continue-on-error: true
run: ./gradlew ktlintCheck
- name: Annotate ktlint errors in the PR
continue-on-error: false
uses: yutailang0119/action-ktlint@v5
with:
report-path: build/reports/ktlint/*.xml
build:
runs-on: ubuntu-latest-8-vcpu
steps:
- uses: actions/checkout@v5
- name: Setup CI
uses: ./.github/actions/common-setup
with:
gradle-cache-read-only: 'false'
datadog-api-key: ${{ secrets.DATADOG_API_KEY }}
lokalise-id: ${{ secrets.LOKALISE_ID }}
lokalise-token: ${{ secrets.LOKALISE_TOKEN }}
- run: echo VERSION_CODE=$(expr 4700 + ${{ github.run_number }} + ${{ github.run_attempt }} - 1) >> $GITHUB_ENV
- uses: chkfung/android-version-actions@v1.2
with:
gradlePath: app/app/build.gradle.kts
versionCode: ${{ env.VERSION_CODE }}
- name: Run license release report
run: ./gradlew licenseReleaseReport --no-configuration-cache --continue
continue-on-error: true
- name: Build
run: "./gradlew :app:bundleDebug"
- name: Setup build tool version variable
shell: bash
run: |
BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1)
echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV
echo Last build tool version is: $BUILD_TOOL_VERSION
- uses: r0adkll/sign-android-release@v1
name: Sign app AAB
id: sign_app
with:
releaseDirectory: app/app/build/outputs/bundle/debug
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }}
- uses: actions/upload-artifact@v4
with:
name: Pull Request-Build
path: ${{ steps.sign_app.outputs.signedReleaseFile }}