-
Notifications
You must be signed in to change notification settings - Fork 19
61 lines (46 loc) · 1.98 KB
/
template_change_test.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
# THIS ACTION IS FOR VALIDATION WITHIN TEMPLATE REPO, AND WILL BE
# REMOVED UPON RUNNING RENAMETEMPLATE GRADLE TASK.
name: Rename Template
# This will cancel any in progress workflows for the same PR, if
# multiple pushes happen in quick succession.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on: pull_request
jobs:
rename-template:
strategy:
matrix:
keepCustomizableDependencies: [true, false]
fail-fast: false
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Set useHiltDependencies
run: |
sed -i '' 's/useHiltDependencies.* : true/useHiltDependencies : ${{ matrix.keepCustomizableDependencies }}/g' buildscripts/setup.gradle
- name: Set useRoomDependencies
run: |
sed -i '' 's/useRoomDependencies.* : true/useRoomDependencies : ${{ matrix.keepCustomizableDependencies }}/g' buildscripts/setup.gradle
- name: Set useRetrofitDependencies
run: |
sed -i '' 's/useRetrofitDependencies.* : true/useRetrofitDependencies : ${{ matrix.keepCustomizableDependencies }}/g' buildscripts/setup.gradle
- name: Set usePaparazziDependencies
run: |
sed -i '' 's/usePaparazziDependencies.* : true/usePaparazziDependencies : ${{ matrix.keepCustomizableDependencies }}/g' buildscripts/setup.gradle
- name: Set useRenovateDependencies
run: |
sed -i '' 's/useRenovateDependencies.* : true/useRenovateDependencies : ${{ matrix.keepCustomizableDependencies }}/g' buildscripts/setup.gradle
- name: Set Up JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
- name: Rename
run: ./gradlew renameTemplate
- name: Lint Checks
run: ./gradlew detektAll lintKotlin lint
- name: Build
run: ./gradlew assembleDebug