-
-
Notifications
You must be signed in to change notification settings - Fork 116
115 lines (112 loc) · 5.44 KB
/
build.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: "Build, lint, and test"
on: [pull_request, push, workflow_dispatch]
env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false"
jobs:
test-verification-mode:
name: Build and test verification mode
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Start emulator
run: shot-consumer/scripts/start_emulator.sh
timeout-minutes: 20
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Check code formatting
run: ./gradlew clean checkScalaFmtAll ktlintCheck
- name: Shot unit tests
run: ./gradlew test
- name: Shot unit tests
run: ./gradlew :shot-android:connectedCheck
- name: Disable artifacts signing
run: echo "RELEASE_SIGNING_ENABLED=false" >> gradle.properties
- name: Build and install Shot
run: ./gradlew publishToMavenLocal
- name: Execute screenshot tests for shot-consumer-library-no-tests
run: ./gradlew executeScreenshotTests
working-directory: shot-consumer-library-no-tests
- name: Execute screenshot tests for shot-consumer-compose
run: ./gradlew executeScreenshotTests
working-directory: shot-consumer-compose
- name: Execute screenshot tests for shot-consumer
run: ./gradlew executeScreenshotTests
working-directory: shot-consumer
- name: Execute screenshot tests for shot-consumer-flavors green flavor
run: ./gradlew greenCustomBuildTypeExecuteScreenshotTests
working-directory: shot-consumer-flavors
- name: Execute screenshot tests for shot-consumer-flavors blue flavor
run: ./gradlew blueCustomBuildTypeExecuteScreenshotTests
working-directory: shot-consumer-flavors
- name: Set orchestrator enabled
run: echo "orchestrated=true" >> $GITHUB_ENV
- name: Execute screenshot tests with orchestrator for shot-consumer-library-no-tests
run: ./gradlew executeScreenshotTests
working-directory: shot-consumer-library-no-tests
- name: Execute screenshot tests with orchestrator for shot-consumer-compose
run: ./gradlew executeScreenshotTests
working-directory: shot-consumer-compose
- name: Execute screenshot tests with orchestrator for shot-consumer
run: ./gradlew executeScreenshotTests
working-directory: shot-consumer
- name: Execute screenshot tests with orchestrator for shot-consumer-flavors green flavor
run: ./gradlew greenCustomBuildTypeExecuteScreenshotTests
working-directory: shot-consumer-flavors
- name: Execute screenshot tests with orchestrator for shot-consumer-flavors blue flavor
run: ./gradlew blueCustomBuildTypeExecuteScreenshotTests
working-directory: shot-consumer-flavors
- uses: actions/upload-artifact@v2
if: always()
with:
name: Reports
path: shot-consumer-compose/app/build/reports/
test-record-mode:
name: Build and test record mode
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Start emulator
run: shot-consumer/scripts/start_emulator.sh
timeout-minutes: 20
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Disable artifacts signing
run: echo "RELEASE_SIGNING_ENABLED=false" >> gradle.properties
- name: Build and install Shot
run: ./gradlew publishToMavenLocal
- name: Execute screenshot tests for shot-consumer-library-no-tests
run: ./gradlew executeScreenshotTests -Precord
working-directory: shot-consumer-library-no-tests
- name: Execute screenshot tests for shot-consumer-compose
run: ./gradlew executeScreenshotTests -Precord
working-directory: shot-consumer-compose
- name: Execute screenshot tests for shot-consumer
run: ./gradlew executeScreenshotTests -Precord
working-directory: shot-consumer
- name: Execute screenshot tests for shot-consumer-flavors green flavor
run: ./gradlew greenCustomBuildTypeExecuteScreenshotTests -Precord
working-directory: shot-consumer-flavors
- name: Execute screenshot tests for shot-consumer-flavors blue flavor
run: ./gradlew blueCustomBuildTypeExecuteScreenshotTests -Precord
working-directory: shot-consumer-flavors
- name: Set orchestrator enabled
run: echo "orchestrated=true" >> $GITHUB_ENV
- name: Execute screenshot tests with orchestrator for shot-consumer-library-no-tests
run: ./gradlew executeScreenshotTests -Precord
working-directory: shot-consumer-library-no-tests
- name: Execute screenshot tests with orchestrator for shot-consumer-compose
run: ./gradlew executeScreenshotTests -Precord
working-directory: shot-consumer-compose
- name: Execute screenshot tests with orchestrator for shot-consumer
run: ./gradlew executeScreenshotTests -Precord
working-directory: shot-consumer
- name: Execute screenshot tests with orchestrator for shot-consumer-flavors green flavor
run: ./gradlew greenCustomBuildTypeExecuteScreenshotTests -Precord
working-directory: shot-consumer-flavors
- name: Execute screenshot tests with orchestrator for shot-consumer-flavors blue flavor
run: ./gradlew blueCustomBuildTypeExecuteScreenshotTests -Precord
working-directory: shot-consumer-flavors