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

[BLO-806] Add static analysis with Sonarqube to Argent-X #1829

Merged
merged 11 commits into from
Feb 27, 2023
Merged

Conversation

diegodelrieu
Copy link
Contributor

@diegodelrieu diegodelrieu commented Feb 24, 2023

Issue / feature description

Add static code analysis to Argent x, quite a lot to discuss here

Basically the whole point is to make sure the code quality is checked at every PR and to allow us to enforce best practices whenever new code is shipped.

The sonarqube dashbaord is available here : https://sonarcloud.io/project/overview?id=argentlabs_argent-x

In sonarqube there's a concept of quality gates which are a set of rules that define what NEW code should go through or not. (emphasis on new to make sure we can start working on it and having the CI green from the beginning). For now they seem a little bit ambitious but we can review them later together and decide what ambitions we have there. Here is the current quality gates (these are company wide expectations - not specific to Argent x)

image

This particular PR fails the quality gates because of PRs that have been merged since then.

Changes

  • Add sonarqube to workflow
  • Split CI workflow between unit and e2e tests to allow them to run in parallel
  • Extend vite.config.ts to collect test coverage
  • Add new script test:ci to collect test coverage when running tests in CI . We only collect coverage for UT for now, later we can add coverage for e2e tests but I think it can be a bit misleading.

@github-actions
Copy link

Builds for local testing

@github-actions
Copy link

Builds for local testing

@github-actions
Copy link

Builds for local testing

1 similar comment
@github-actions
Copy link

Builds for local testing

@github-actions
Copy link

Builds for local testing

@github-actions
Copy link

Builds for local testing

@github-actions
Copy link

Builds for local testing

@github-actions
Copy link

Builds for local testing

@github-actions
Copy link

Builds for local testing

@github-actions
Copy link

Builds for local testing

@diegodelrieu diegodelrieu changed the title collect coverage from tests [BLO-806] Add static analysis with Sonarqube to Argent-X Feb 24, 2023
@diegodelrieu diegodelrieu marked this pull request as ready for review February 24, 2023 15:20
@janek26
Copy link
Collaborator

janek26 commented Feb 24, 2023

would love @gergold 's feedback on this

@github-actions
Copy link

Builds for local testing

1 similar comment
@github-actions
Copy link

Builds for local testing

@github-actions
Copy link

Builds for local testing

@github-actions
Copy link

Builds for local testing

@github-actions
Copy link

Builds for local testing

@github-actions
Copy link

Builds for local testing

@github-actions
Copy link

Builds for local testing

@sonarcloud
Copy link

sonarcloud bot commented Feb 27, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

6.6% 6.6% Coverage
0.0% 0.0% Duplication

@diegodelrieu diegodelrieu merged commit 71b53f1 into develop Feb 27, 2023
@diegodelrieu diegodelrieu deleted the BLO-806 branch February 27, 2023 15:00
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.

4 participants