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

feat(cicd): Add UT to PR's via SonarCloud #121

Draft
wants to merge 24 commits into
base: dev
Choose a base branch
from
Draft

feat(cicd): Add UT to PR's via SonarCloud #121

wants to merge 24 commits into from

Conversation

acoard-aot
Copy link
Contributor

Description

Please provide a summary of the change and the issue fixed. Please include relevant context. List dependency changes.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist

  • I have read the CONTRIBUTING doc
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have already been accepted and merged

Further comments

Copy link
Contributor

@mishraomp mishraomp left a comment

Choose a reason for hiding this comment

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

Looks great overall,
few minor feedback to make sure tests run
we need lcov reporter for both frontend and backend
sample frontend config in QSOS, need similar here, https://github.com/bcgov/quickstart-openshift/blob/main/frontend/vitest.config.ts#L16

sample backend config which can be copy pasted here,
https://github.com/bcgov/quickstart-openshift/blob/main/backend/package.json#L101-L105

.github/workflows/analysis.yml Outdated Show resolved Hide resolved
.github/workflows/analysis.yml Outdated Show resolved Hide resolved
.github/workflows/analysis.yml Outdated Show resolved Hide resolved
.sonarcloud.properties Outdated Show resolved Hide resolved
token: SONAR_TOKEN_FRONTEND
steps:
- uses: bcgov-nr/action-test-and-analyse@v1.2.1
with:
Copy link
Contributor

Choose a reason for hiding this comment

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

may need env variables for the tests to run, we can always pass all the frontend and backend env vars in the env: , and then it will be picked by each job and they use based on their needs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The unit tests are running now without ading any env: so I think it's okay without.

However, I am still having issues with SonarCloud getting the results of the tests, so still investigating.

nikhila-aot
nikhila-aot previously approved these changes Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants