Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: added workflow_call to the ci.yml #1541

Merged
merged 7 commits into from
Sep 8, 2023

Conversation

fbarbu15
Copy link
Collaborator

@fbarbu15 fbarbu15 commented Sep 7, 2023

Problem

When nwaku creates a release it needs to run the jswaku tests (ideally automatically) against the release

Solution

Added workflow_call so the ci can be invoked via reusable workflows
Exclude based on the caller input the un-needed jobs

Notes

@fbarbu15 fbarbu15 requested a review from a team as a code owner September 7, 2023 08:23
@fbarbu15 fbarbu15 requested a review from vpavlin September 7, 2023 08:24
@github-actions
Copy link

github-actions bot commented Sep 7, 2023

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Waku core 28.73 KB (0%) 575 ms (0%) 1.6 s (-24.32% 🔽) 2.1 s
Waku Simple Light Node 309.7 KB (0%) 6.2 s (0%) 5.1 s (-13.49% 🔽) 11.3 s
ECIES encryption 28.68 KB (0%) 574 ms (0%) 2.4 s (+34.58% 🔺) 3 s
Symmetric encryption 28.68 KB (0%) 574 ms (0%) 1.9 s (+3.35% 🔺) 2.5 s
DNS discovery 118.59 KB (0%) 2.4 s (0%) 2.9 s (-3.04% 🔽) 5.3 s
Privacy preserving protocols 122.61 KB (0%) 2.5 s (0%) 3.2 s (+29.6% 🔺) 5.7 s
Light protocols 28.95 KB (0%) 579 ms (0%) 1.1 s (-39.22% 🔽) 1.7 s
History retrieval protocols 28.08 KB (0%) 562 ms (0%) 865 ms (-16.68% 🔽) 1.5 s
Deterministic Message Hashing 5.64 KB (0%) 113 ms (0%) 366 ms (-53.25% 🔽) 478 ms

@@ -13,6 +13,11 @@ on:
description: "Docker hub image name taken from https://hub.docker.com/r/statusteam/nim-waku/tags. Format: statusteam/nim-waku:v0.19.0"
required: false
type: string
workflow_call:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is is accesible now from nwaku? I am not sure the organizational setting allows it now

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@vpavlin is doing the changes on nwaku side and we'll check if we can use reusable workflows across repos. Worst case we need to use github api

Copy link
Member

Choose a reason for hiding this comment

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

Looks like I am able to execute this from my workflows (even outside of waku-org) - https://github.com/nwaku-test-org/nwaku/actions/runs/6110682343/job/16584422746

Looks pretty awesome!

Copy link
Collaborator

Choose a reason for hiding this comment

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

even outside of waku-org

huh, we need to fix it, I guess the setting is too generous

@fryorcraken can you limit execution only to the same org?

Copy link
Member

Choose a reason for hiding this comment

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

Why? It's a public repo, which is IMO how this gets "pulled in" to your workflow execution - the actual execution happens on caller runners, so it does not really influence you/the js-waku repo

Copy link
Member

Choose a reason for hiding this comment

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

I agree that splitting this WF up into smaller chunks would make sense, but would it be ok to merge it as is and the iterate over it? I'd like to get this in on our side before our release next week (i.e. ideally merge both PRs today)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Considering that we need to run just node and node-optional tests, and exclude any other jobs, then indeed using reusable workflows for those steps would be the best approach.
In that case the nwaku CI will call the node.yml and node-optional.yml instead of calling the whole ci.yml
Would that work for you @vpavlin ?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, that would be fine for me

Copy link
Collaborator Author

@fbarbu15 fbarbu15 Sep 8, 2023

Choose a reason for hiding this comment

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

I'm ok to merge it and create a new PR with the splitting. @weboko what about you?
And if you are ok, can you please merge it? Because I don't have merge access. Thanks

Copy link
Collaborator

Choose a reason for hiding this comment

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

oh, I thought you could merge yourself
I agree with follow-up to this later, let's track it here #1548

Copy link
Member

@vpavlin vpavlin left a comment

Choose a reason for hiding this comment

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

Works great!

see example execution from my test-org:
https://github.com/nwaku-test-org/nwaku/actions/runs/6110682343/job/16584422746

Copy link
Collaborator

@weboko weboko left a comment

Choose a reason for hiding this comment

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

👍 nice

@weboko weboko merged commit 1cfe0fc into master Sep 8, 2023
10 checks passed
@weboko weboko deleted the chore/add-workflow-call-to-ci branch September 8, 2023 08:38
@fbarbu15 fbarbu15 added the E:End-to-end testing See https://github.com/waku-org/pm/issues/34 for details label Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E:End-to-end testing See https://github.com/waku-org/pm/issues/34 for details
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants