Test debug=false #360
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} | |
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 Android 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 Android 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 Android 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 Android 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 }} | |
smoke-test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 21 | |
- run: python3 -m pip install requests | |
shell: bash | |
- name: Get Android Auto app APKs for test purposes | |
run: | | |
import requests | |
responseOld = requests.get("https://github.com/usefulness/storage/raw/master/android-auto-very-old.apk") | |
open("very-old-apk.apk", "wb").write(responseOld.content) | |
responseNew = requests.get("https://github.com/usefulness/storage/raw/master/android-auto-new.apk") | |
open("new-apk.apk", "wb").write(responseNew.content) | |
shell: python | |
- id: diffuse-custom-repo-hardcoded | |
uses: ./ | |
with: | |
old-file-path: very-old-apk.apk | |
new-file-path: new-apk.apk | |
lib-version: 0.3.0 | |
diffuse-repo: JakeWharton/diffuse | |
debug: true | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: diffuse-custom-repo-hardcoded-${{ matrix.os }} | |
path: ${{ steps.diffuse-custom-repo-hardcoded.outputs.diff-file }} | |
- id: diffuse-custom-repo-latest | |
uses: ./ | |
with: | |
old-file-path: very-old-apk.apk | |
new-file-path: new-apk.apk | |
lib-version: latest | |
diffuse-repo: JakeWharton/diffuse | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: diffuse-custom-repo-latest-${{ matrix.os }} | |
path: ${{ steps.diffuse-custom-repo-latest.outputs.diff-file }} | |