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

add JS plugin test workflow #47

Merged
merged 1 commit into from
Mar 14, 2024
Merged

add JS plugin test workflow #47

merged 1 commit into from
Mar 14, 2024

Conversation

evgeni
Copy link
Member

@evgeni evgeni commented Mar 13, 2024

Fixes: #42

@evgeni evgeni force-pushed the jstests branch 7 times, most recently from 843a0c7 to fa9218a Compare March 13, 2024 10:33
@evgeni
Copy link
Member Author

evgeni commented Mar 13, 2024

The failures are legit and fixed in Katello/katello#10929 and theforeman/foreman#10095

@evgeni evgeni force-pushed the jstests branch 3 times, most recently from a9e2371 to 93caebe Compare March 13, 2024 10:54
@evgeni
Copy link
Member Author

evgeni commented Mar 13, 2024

cc @dosas you might be interested :)

@dosas
Copy link

dosas commented Mar 13, 2024

@evgeni Thanks, very nice!

exclude: ${{ inputs.matrix_exclude }}

test:
name: "Foreman ${{ inputs.foreman_version }} Ruby ${{ matrix.ruby }} and Node ${{ matrix.node }}"
Copy link

Choose a reason for hiding this comment

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

Why do we need ruby for js tests?

Copy link
Member Author

Choose a reason for hiding this comment

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

Foreman's postinstall script calls script/npm_install_plugins.js
https://github.com/theforeman/foreman/blob/4abf925fbd72264e8c316d720c03c1dd75688507/package.json#L19
And that, via script/plugin_webpack_directories.js needs Ruby.

Copy link
Member Author

@evgeni evgeni Mar 13, 2024

Choose a reason for hiding this comment

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

Mind you, we just ensure Ruby is there, we do not install any gems or anything, so that step is rather quick.

(also, you only need foreman to be even there for some plugins that share code with Foreman via find-foreman: https://github.com/Katello/katello/blob/master/webpack/.eslintrc.js, https://github.com/theforeman/foreman_openscap/blob/02d91220a206b6c121f6938a826eb9b4598af2f3/jest.config.js#L4)

Copy link
Member Author

Choose a reason for hiding this comment

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

We could also skip installing a specific Ruby, given that GHA images come with Ruby pre-installed, but it felt wrong to me as that could lead to a version of Ruby that is unsupported by our stack.

Copy link

Choose a reason for hiding this comment

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

Thanks for the clarification

@evgeni
Copy link
Member Author

evgeni commented Mar 13, 2024

🍏

@ekohl ekohl merged commit 0348303 into v0 Mar 14, 2024
4 checks passed
@ekohl ekohl deleted the jstests branch March 14, 2024 13:09
@ekohl
Copy link
Member

ekohl commented Mar 14, 2024

Documenting this in README would be nice.

@evgeni
Copy link
Member Author

evgeni commented Mar 14, 2024

#48 adds docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Reusable Javascript tests
3 participants