Skip to content

INTMDB-788: Add Code-health action #1144

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

Merged
merged 19 commits into from
May 15, 2023
Merged

INTMDB-788: Add Code-health action #1144

merged 19 commits into from
May 15, 2023

Conversation

andreaangiolillo
Copy link
Collaborator

@andreaangiolillo andreaangiolillo commented Apr 26, 2023

Description

Proposed changes:

Create a code-health workflow similar to what we have in CFN and CDK
This new workflow runs the following jobs:

Screenshot 2023-04-26 at 11 28 19

Type of change:

  • 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
  • Documentation fix/enhancement

Required Checklist:

  • I have signed the MongoDB CLA
  • I have read the contribution guidelines
  • I have added tests that prove my fix is effective or that my feature works per HashiCorp requirements
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code

Further comments

Next Steps:

  • Make code-health required for PRs

Comment on lines +8 to +15
while IFS= read -r -d '' f; do
if [ "${1-}" = "diff" ]; then
echo "$f"
cat "$f" | node_modules/.bin/codedown hcl | terraform fmt -diff=true -
< "$f" node_modules/.bin/codedown hcl | terraform fmt -diff=true -
else
cat "$f" | node_modules/.bin/codedown hcl | terraform fmt -check=true - || problems=true && echo "Formatting errors in $f"
< "$f" node_modules/.bin/codedown hcl | terraform fmt -check=true - || { problems=true && echo "Formatting errors in $f"; }
fi
done
done < <(find website -name '*.markdown' -print0)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi @martinstibbe, is this script still used? when I run make websitefmtcheck the script says that there are some markdown with formatting errors 😕
Should we run this script as part of the code-health action?

Copy link
Contributor

Choose a reason for hiding this comment

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

Since TF registry website test stopped working as the deprecated the local site document testing if we do not call this one via a GH action may not be used golangci-lint run is in current workflows

pull_request:

jobs:
tests:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

move to code-health

@@ -1,22 +0,0 @@
---
name: golangci-lint
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

moved to code-health

@andreaangiolillo andreaangiolillo marked this pull request as ready for review April 26, 2023 10:28
@andreaangiolillo andreaangiolillo requested a review from a team as a code owner April 26, 2023 10:28
Copy link
Contributor

@Zuhairahmed Zuhairahmed left a comment

Choose a reason for hiding this comment

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

LGTM pending @martinstibbe feedback

@andreaangiolillo
Copy link
Collaborator Author

Hi @martinstibbe 👋 Could you review this PR when you have time, please? I am not sure if I can merge it after your comment

Copy link
Contributor

@martinstibbe martinstibbe left a comment

Choose a reason for hiding this comment

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

LGTM

@andreaangiolillo andreaangiolillo merged commit f7455e5 into master May 15, 2023
@andreaangiolillo andreaangiolillo deleted the INTMDB-788 branch July 17, 2023 14:52
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