-
Notifications
You must be signed in to change notification settings - Fork 0
217 lines (175 loc) · 6.97 KB
/
main.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
on:
pull_request:
jobs:
test-apk:
runs-on: ubuntu-latest
name: Run diffuse action (part 1)
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Get old version of Andorid Auto app for test purposes
run: wget "https://github.com/usefulness/storage/raw/master/android-auto-old.apk" -O old-apk.apk
- name: Get new version of Andorid Auto app for test purposes
run: wget "https://github.com/usefulness/storage/raw/master/android-auto-new.apk" -O new-apk.apk
- id: diffuse
uses: ./
with:
old-file-path: old-apk.apk
new-file-path: new-apk.apk
debug: true
- uses: peter-evans/find-comment@v3
id: find_comment
with:
issue-number: ${{ github.event.pull_request.number }}
body-includes: diffuse-smoke-test-1
- uses: peter-evans/create-or-update-comment@v4
with:
body: |
### diffuse-smoke-test-1
`size-old-bytes`: ${{ steps.diffuse.outputs.size-old-bytes }}
`size-old-text`: ${{ steps.diffuse.outputs.size-old-text }}
`size-new-bytes`: ${{ steps.diffuse.outputs.size-new-bytes }}
`size-new-text`: ${{ steps.diffuse.outputs.size-new-text }}
`size-diff-comment_style_1`: ${{ steps.diffuse.outputs.size-diff-comment_style_1 }}
`steps.diffuse.outputs.diff-gh-comment:`
${{ steps.diffuse.outputs.diff-gh-comment }}
`steps.diffuse.outputs.summary`
```
${{ steps.diffuse.outputs.summary }}
```
`steps.diffuse.outputs.manifest`
```
${{ steps.diffuse.outputs.manifest }}
```
`steps.diffuse.outputs.dex`
```
${{ steps.diffuse.outputs.dex }}
```
`steps.diffuse.outputs.diff-gh-comment-all-collapsed`
${{ steps.diffuse.outputs.diff-gh-comment-all-collapsed }}
edit-mode: replace
comment-id: ${{ steps.find_comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v4
with:
name: diffuse-output-1
path: ${{ steps.diffuse.outputs.diff-file }}
test-apk-2:
runs-on: ubuntu-latest
name: Run diffuse action (part 2)
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Get very old version of Andorid Auto app for test purposes
run: wget "https://github.com/usefulness/storage/raw/master/android-auto-very-old.apk" -O very-old-apk.apk
- name: Get new version of Andorid Auto app for test purposes
run: wget "https://github.com/usefulness/storage/raw/master/android-auto-new.apk" -O new-apk.apk
- id: diffuse
uses: ./
with:
old-file-path: very-old-apk.apk
new-file-path: new-apk.apk
debug: true
- uses: peter-evans/find-comment@v3
id: find_comment
with:
issue-number: ${{ github.event.pull_request.number }}
body-includes: diffuse-smoke-test-2
- uses: peter-evans/create-or-update-comment@v4
with:
body: |
### diffuse-smoke-test-2
`size-old-bytes`: ${{ steps.diffuse.outputs.size-old-bytes }}
`size-old-text`: ${{ steps.diffuse.outputs.size-old-text }}
`size-new-bytes`: ${{ steps.diffuse.outputs.size-new-bytes }}
`size-new-text`: ${{ steps.diffuse.outputs.size-new-text }}
`size-diff-comment_style_1`: ${{ steps.diffuse.outputs.size-diff-comment_style_1 }}
`steps.diffuse.outputs.diff-gh-comment-no-dex:`
${{ steps.diffuse.outputs.diff-gh-comment-no-dex }}
`steps.diffuse.outputs.summary`
```
${{ steps.diffuse.outputs.summary }}
```
`steps.diffuse.outputs.manifest`
```
${{ steps.diffuse.outputs.manifest }}
```
`steps.diffuse.outputs.dex`
```
${{ steps.diffuse.outputs.dex }}
```
`steps.diffuse.outputs.diff-gh-comment-no-dex-all-collapsed`
${{ steps.diffuse.outputs.diff-gh-comment-no-dex-all-collapsed }}
edit-mode: replace
comment-id: ${{ steps.find_comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v4
with:
name: diffuse-output-2
path: ${{ steps.diffuse.outputs.diff-file }}
test-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- run: python -m pip install requests
- name: Get old version of Andorid Auto app for test purposes
run: curl.exe --output old-apk.apk "https://github.com/usefulness/storage/raw/master/android-auto-old.apk"
- name: Get new version of Andorid Auto app for test purposes
run: curl.exe --output new-apk.apk "https://github.com/usefulness/storage/raw/master/android-auto-new.apk"
- id: diffuse
uses: ./
if: ${{ false }} # diffuse isn't compatible with windows
with:
old-file-path: old-apk.apk
new-file-path: new-apk.apk
lib-version: 0.1.0
diffuse-repo: JakeWharton/diffuse
debug: true
- uses: actions/upload-artifact@v4
if: ${{ false }} # diffuse isn't compatible with windows
with:
name: diffuse-output-3
path: ${{ steps.diffuse.outputs.diff-file }}
test-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- run: python -m pip install requests
- name: Get very old version of Andorid Auto app for test purposes
run: wget "https://github.com/usefulness/storage/raw/master/android-auto-very-old.apk" -O very-old-apk.apk
- name: Get new version of Andorid Auto app for test purposes
run: wget "https://github.com/usefulness/storage/raw/master/android-auto-new.apk" -O new-apk.apk
- id: diffuse
uses: ./
with:
old-file-path: very-old-apk.apk
new-file-path: new-apk.apk
debug: true
lib-version: latest
diffuse-repo: JakeWharton/diffuse
- uses: actions/upload-artifact@v4
with:
name: diffuse-output-4
path: ${{ steps.diffuse.outputs.diff-file }}