-
Notifications
You must be signed in to change notification settings - Fork 42
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: split node from CI #1566
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
4c9233e
split node from CI
fbarbu15 1dbb1e5
fix calling the node
fbarbu15 c3c31b1
remove ref
fbarbu15 4683d24
make reusable test node workflow
fbarbu15 27ec075
small fix after ci run
fbarbu15 a95202f
small fix after ci run
fbarbu15 7fd6803
small fix after ci run
fbarbu15 5b9935e
fix debug mismatch
fbarbu15 ba49fa1
Merge branch 'master' of https://github.com/waku-org/js-waku into cho…
fbarbu15 8eac299
move node to action folder
fbarbu15 c577b2c
add ref to the node call
fbarbu15 442e18c
add sha to the node call
fbarbu15 a15b027
remove file name from the node call
fbarbu15 9baf52a
move back node to workflows
fbarbu15 7a52dd6
move back node to workflows
fbarbu15 999e95a
fix typo
fbarbu15 884d376
merge master into branch and resolve conflicts
fbarbu15 4d54027
Merge branch 'master' into chore/split-ci-into-chunks
weboko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Run Test | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
nim_wakunode_image: | ||
required: true | ||
type: string | ||
test_type: | ||
required: true | ||
type: string | ||
debug: | ||
required: false | ||
type: string | ||
default: '' | ||
|
||
env: | ||
NODE_JS: "18" | ||
WAKU_SERVICE_NODE_PARAMS: ${{ (inputs.test_type == 'go-waku-master') && '--min-relay-peers-to-publish=0' || '' }} | ||
DEBUG: ${{ inputs.debug }} | ||
|
||
jobs: | ||
node: | ||
runs-on: ubuntu-latest | ||
env: | ||
WAKUNODE_IMAGE: ${{ inputs.nim_wakunode_image }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
repository: waku-org/js-waku | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_JS }} | ||
|
||
- uses: ./.github/actions/npm | ||
|
||
- run: npm run build:esm | ||
|
||
- run: ${{ (inputs.test_type == 'node-optional') && 'npm run test:optional --workspace=@waku/tests' || 'npm run test:node' }} | ||
|
||
- name: Upload debug logs on failure | ||
uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: ${{ inputs.test_type }}-debug.log | ||
path: debug.log | ||
|
||
- name: Upload logs on failure | ||
uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: ${{ inputs.test_type }}-logs | ||
path: packages/tests/log/ |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Github CI works in a way that if is sees a file in the
workflows
folder then it unfolds into steps in the CI.One way can be to re-use the action but then you need to place it into
actions
folder (similar toactions/npm
I created there) and from ther you can use it (I am not sure if it is possible to rely on it from different repo)Or to create a file in
workflows
and expect it to be run injs-waku
andnwaku
and have conditions in it to handle thatThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried to move it to
actions
but unfortunately it doesn't work. Actions is for jobs (likenpm
) not workflows and I need a workflow for theworkflow_call
functionality and cross repo usage.So I need the new workflow to be excluded from the
Required status checks
in the Branch protection rules and made optional (similar to all other tests).@weboko do you have access to do this or do I need to ask @fryorcraken ?
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@weboko @fryorcraken little help here please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fbarbu15 was looking into it yesterday, to me it seemed that some different configuration might help here but if some setting on the repo required - I do not have access.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know if you have a better idea on how to handle this.
On the other hand to fix it on my implementation we need something like this(tried it on a forked repo):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case we need to ask @fryorcraken to do the setting change
and I think we need to skip
node Expected — Waiting for status to be reported
in js-waku all together (seems it's already done)