Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Handle multiple APKs installable for an Installable Build #79

Merged
merged 3 commits into from
Jun 25, 2021

Conversation

AliSoftware
Copy link
Contributor

The link in the Peril comment for the installable WPAndroid build (e.g wordpress-mobile/WordPress-Android#14936 (comment)) is actually pointing to the Jetpack app.

We're able to download the apk if we visit the artifacts page anyway, but it's nicer to have Peril provide the link for all installable APKs not just the first one.

\cc @hypest

@AliSoftware AliSoftware requested review from hypest and loremattei June 25, 2021 11:08
@AliSoftware AliSoftware self-assigned this Jun 25, 2021
@AliSoftware AliSoftware requested a review from jkmassel June 25, 2021 11:36
@hypest
Copy link

hypest commented Jun 25, 2021

👋 @AliSoftware ! I wonder, can you share some testing instructions to verify if/how the changes here work? I'm not familiar with the Peril integration and I wonder how can I go about reviewing this PR. Thanks!

@AliSoftware
Copy link
Contributor Author

AliSoftware commented Jun 25, 2021

The testing instructions are a bit tricky for Peril, because it's written in TypeScript… so if you want to run the unit tests (which I updated in that PR), you need to have npm and yarn installed, and then you can run yarn test to run the unit tests.

But this is something that the CI already does (running unit tests), so if the CI is green that means those passed and no need to test locally.

I don't think we can test much more (e.g testing the rule on an actual PR) easily given this is a bot that acts on all our repos and only uses the config and rule files in master, not in PRs (I mean, there are ways to run Peril locally either on your mac or in Docker, and then point it to a PR and all, but way too much trouble for what it's worth, so we never do that and just trust our unit tests.)

@hypest
Copy link

hypest commented Jun 25, 2021

Thanks for elaborating Olivier! I'll give the diff a visual look and probably optimistically give the go ahead if nothing captures my attention :)

@@ -151,4 +151,29 @@ describe("installable build handling", () => {

expectComment(webhook, `You can test the changes on this Pull Request by downloading the APK [here](${mockedArtifacts[0].url}).`)
})

it("Posts a download comment linking to multiple APKs", async () => {
Copy link
Contributor Author

@AliSoftware AliSoftware Jun 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this unit test is just a shameless copy/paste of the previous unit test (lines 133-153) for single-APK case, adjusted to have a mockedArtifacts containing multiple APKs and an adjusted expectation.

org/pr/installable-build.ts Outdated Show resolved Hide resolved
Copy link

@hypest hypest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM @AliSoftware ! I only left a very minor comment, otherwise looks good to me.

While at it I verified that tests do run correct locally as well 👍

@AliSoftware AliSoftware merged commit 7831693 into master Jun 25, 2021
@AliSoftware AliSoftware deleted the installable-builds/multiple-apks branch June 25, 2021 16:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants