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 GitHub action to run SonarQube for METplotpy pull requests and feature branches #429

Closed
12 of 28 tasks
JohnHalleyGotway opened this issue Apr 3, 2024 · 1 comment · Fixed by #430, #431, #438 or #439
Closed
12 of 28 tasks
Labels
component: code optimization Code optimization issue priority: high High Priority requestor: USAF United States Air Force type: new feature Make it do something new

Comments

@JohnHalleyGotway
Copy link
Contributor

JohnHalleyGotway commented Apr 3, 2024

Describe the New Feature

This issue is to add a new SonarQube workflow to GitHub actions to automate the static code analysis for all pull requests. In addition, add a manual trigger workflow dispatch option where the reference branch can be manually specified.

Recommend adding this workflow to both the develop branch and the current main_v*so that the workflow dispatch option can be made available.

Recommend pushing results to a new SonarQube project named METplotpy GHA at needham.rap.ucar.edu.

Recommend having the workflow report bad status if the number of SonarQube findings are increased relative to the SonarQube reference.

See issue dtcenter/MET#2379 and its two linked PR's as an example, but the implementation for a python-only repo should be more straight-forward.

Acceptance Testing

List input data types and sources.
Describe tests required for new functionality.

Time Estimate

Estimate the amount of work required here.
Issues should represent approximately 1 to 3 days of work.

Sub-Issues

Consider breaking the new feature down into sub-issues.

  • Add a checkbox for each sub-issue here.

Relevant Deadlines

List relevant project deadlines here or state NONE.

Funding Source

Needed for the Air Force - 2771024

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required
  • Select scientist(s) or no scientist required

Labels

  • Select component(s)
  • Select priority
  • Select requestor(s)

Projects and Milestone

  • Select Repository and/or Organization level Project(s) or add alert: NEED CYCLE ASSIGNMENT label
  • Select Milestone as the next official version or Future Versions

Define Related Issue(s)

Consider the impact to the other METplus components.

The following SonarQube issues are closely related:

New Feature Checklist

See the METplus Workflow for details.

  • Complete the issue definition above, including the Time Estimate and Funding source.
  • Fork this repository or create a branch of develop.
    Branch name: feature_<Issue Number>_<Description>
  • Complete the development and test your changes.
  • Add/update log messages for easier debugging.
  • Add/update unit tests.
  • Add/update documentation.
  • Add any new Python packages to the METplus Components Python Requirements table.
  • Push local changes to GitHub.
  • Submit a pull request to merge into develop.
    Pull request: feature <Issue Number> <Description>
  • Define the pull request metadata, as permissions allow.
    Select: Reviewer(s) and Development issues
    Select: Repository level development cycle Project for the next official release
    Select: Milestone as the next official version
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Close this issue.
@JohnHalleyGotway JohnHalleyGotway added type: new feature Make it do something new priority: high High Priority component: code optimization Code optimization issue requestor: USAF United States Air Force labels Apr 3, 2024
@JohnHalleyGotway JohnHalleyGotway added this to the METplotpy-3.0.0 milestone Apr 3, 2024
@JohnHalleyGotway JohnHalleyGotway linked a pull request Apr 4, 2024 that will close this issue
@JohnHalleyGotway JohnHalleyGotway linked a pull request Apr 5, 2024 that will close this issue
bikegeek pushed a commit that referenced this issue Apr 8, 2024
* Per #429, add SonarQube workflow for METplotpy

* Per #429, update nightly build email list.

* Per #429, fix cut/paste error configure_sonarqube.sh

* Per #429, exclude test code from code coverage statistics.
bikegeek pushed a commit that referenced this issue Apr 8, 2024
* Per #429, add SonarQube workflow for METplotpy

* Per #429, update nightly build email list.

* Per #429, fix cut/paste error configure_sonarqube.sh

* Per #429, exclude test code from code coverage statistics.
@JohnHalleyGotway
Copy link
Contributor Author

Reopening issue during the beta5 development cycle to switch to pushing to a single SonarQube project rather than separate ones for GitHub actions and the nightly build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment