Conversation
This isn't OK for a CI change |
|
I’ve corrected the |
Are you testing the comparison itself? |
|
I can test the size calculation locally with sample artifact values, but the artifact download and PR comment require GitHub Actions. The full workflow will therefore be verified when the PR-triggered emulator workflow completes and invokes the comparison workflow. |
|
Can you test it on your fork? |
|
I tested the comparison math and invalid-size handling locally. I haven’t verified artifact download or PR commenting yet. Since this uses |
|
I typically test on my fork's |
|
I tested the workflow on my fork. The PR emulator run passed, and the comparison workflow successfully downloaded both APK-size artifacts, calculated the difference, and posted a comment. The test showed 49,910,777 bytes for both builds. I restored my fork’s main afterward and closed the temporary test PR. |
|
Cheers! Could you link the results? |
|
Sure! The PR emulator run passed here, and the APK size comparison run completed here. It compared both APKs at 49,910,777 bytes and posted the result on the temporary test PR. |
|
|
||
| async function addComment(prNumber, oldSize, newSize) { | ||
| return await github.rest.issues.createComment({ | ||
| const prNumber = context.payload.workflow_run.pull_requests[0].number; |
There was a problem hiding this comment.
This seems to be empty?
gh api repos/ankidroid/Anki-Android/actions/runs/36271038668 --jq '.pull_requests'
returns
[]
Purpose / Description
Automate APK size comparisons for pull requests by comparing the PR release APK against the latest successful
mainrelease APK.Fixes
Approach
The emulator workflow records and uploads the release APK size as an artifact for PRs and
mainpushes. A follow-up workflow downloads the PR artifact and the latest successfulmainartifact, compares their sizes, and updates a single PR comment with the result.How Has This Been Tested?
Verified by GitHub Actions: unit tests, Kotlin/JavaScript quality checks, and release emulator tests passed.
Checklist
Please, go through these checks before submitting the PR.