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

Enhance the unit test action #4662

Closed
5 tasks done
Desvelao opened this issue Oct 11, 2022 · 2 comments · Fixed by #4680
Closed
5 tasks done

Enhance the unit test action #4662

Desvelao opened this issue Oct 11, 2022 · 2 comments · Fixed by #4680
Assignees
Labels
type/enhancement Enhancement issue

Comments

@Desvelao
Copy link
Member

Desvelao commented Oct 11, 2022

Description

The wazuh-unit-test GitHub action is limited to running in a specific environment (Kibana 7.10.2) and this could give problems in plugins for other Kibana versions, moreover, the action can not run for plugin compatibles with OpenSearch Dashboards.

Tasks

  • Use the images hosted on quay.com
  • Support run the action for plugin compatibles with OpenSearch Dashboards
  • Allow the action can run on:
    • pull request
    • dispatch
@Desvelao Desvelao added the type/enhancement Enhancement issue label Oct 11, 2022
@Desvelao Desvelao self-assigned this Oct 11, 2022
@Desvelao
Copy link
Member Author

Update

Note: I am working in a private repository to test the action due to it is required the action is in the repository main branch. In this way, I can test without pushing changes to the main branch. The intention is getting the workflow definition and move it to this repository.

I created a reusable workflow that installs the plugin in development mode using the hosted Docker images in quay.com. This workflow allows us runs the tests and can be expanded for other tasks that require the development mode as the building a package.

This workflow can be:

  • dispatched:
    • Receive 2 parameters:
      • reference: branch/tag/commit SHA of the plugin source code
      • command: select the commando to execute the unit tests. Currently yarn test:jest
  • on pull request: no tested

@Desvelao
Copy link
Member Author

Update

I am extending the reusable workflow to build a plugin package on demand.

Others changes:

  • Add a comment with the test coverage of unit tests on pull requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Enhancement issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant