Update actions/setup-java action to v4 #283
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: | |
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@v2 | |
id: find_comment | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
body-includes: diffuse-smoke-test-1 | |
- uses: peter-evans/create-or-update-comment@v3 | |
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@v3 | |
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@v2 | |
id: find_comment | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
body-includes: diffuse-smoke-test-2 | |
- uses: peter-evans/create-or-update-comment@v3 | |
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@v3 | |
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@v4 | |
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@v3 | |
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@v4 | |
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@v3 | |
with: | |
name: diffuse-output-4 | |
path: ${{ steps.diffuse.outputs.diff-file }} |