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

Configure unit test environment; add build & test CI #104

Merged
merged 4 commits into from
Mar 4, 2024

Conversation

ohltyler
Copy link
Member

@ohltyler ohltyler commented Mar 2, 2024

Description

This PR sets up the initial test coverage configuration and initial build-and-test CI to run on every pull request and push to all branches. It includes all necessary mocks for core services, redux store, and CSS files as demonstrated by the sample unit test added workflows.test.tsx.

Consistent with other plugins, this adds a script test:jest which is used to execute tests.

Check out the incredible coverage!

yarn test:jest
yarn run v1.22.19
warning package.json: License should be a valid SPDX license expression
$ ../../node_modules/.bin/jest --config ./test/jest.config.js
 PASS  public/pages/workflows/workflows.test.tsx
  Workflows
    ✓ renders the page (155 ms)

Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        3.356 s
Ran all test suites.

Issues Resolved

Resolves #103
Resolves #105

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@ohltyler ohltyler changed the title Configure unit test environment; add UT CI Configure unit test environment; add build & test CI Mar 2, 2024
Signed-off-by: Tyler Ohlsen <[email protected]>

Add UT CI

Signed-off-by: Tyler Ohlsen <[email protected]>

Move style mock under mocks/

Signed-off-by: Tyler Ohlsen <[email protected]>

Remove requiredbundle

Signed-off-by: Tyler Ohlsen <[email protected]>

Rename ci

Signed-off-by: Tyler Ohlsen <[email protected]>

shorten CI names

Signed-off-by: Tyler Ohlsen <[email protected]>

update

Signed-off-by: Tyler Ohlsen <[email protected]>
ohltyler added 2 commits March 1, 2024 18:11
Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
Copy link

codecov bot commented Mar 2, 2024

Welcome to Codecov 🎉

Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment.

Thanks for integrating Codecov - We've got you covered ☂️

@ohltyler ohltyler added the test label Mar 2, 2024
Signed-off-by: Tyler Ohlsen <[email protected]>
@ohltyler ohltyler merged commit 1690766 into opensearch-project:main Mar 4, 2024
8 of 9 checks passed
@ohltyler ohltyler deleted the add-ut branch March 4, 2024 16:47
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 4, 2024
Signed-off-by: Tyler Ohlsen <[email protected]>
(cherry picked from commit 1690766)
ohltyler added a commit that referenced this pull request Mar 4, 2024
…106)

* Configure unit test environment; add build & test CI (#104)

Signed-off-by: Tyler Ohlsen <[email protected]>
(cherry picked from commit 1690766)

* Update build-and-test.yml

Signed-off-by: Tyler Ohlsen <[email protected]>

---------

Signed-off-by: Tyler Ohlsen <[email protected]>
Co-authored-by: Tyler Ohlsen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add build and test CI workflow Configure UT environment and baseline mocks
2 participants