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 docs for coverage.md and enable tests requirement for feature/bug… #1857

Merged
merged 1 commit into from
Oct 22, 2020

Conversation

ipanova
Copy link
Member

@ipanova ipanova commented Sep 24, 2020

…fix.

closes #7567
https://pulp.plan.io/issues/7567

@pulpbot
Copy link
Member

pulpbot commented Sep 24, 2020

Attached issue: https://pulp.plan.io/issues/7567

Copy link
Contributor

@pavelpicka pavelpicka left a comment

Choose a reason for hiding this comment

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

LGTM

# check if a test was added
NEEDS_TEST=$(git diff --name-only $RANGE | grep -E 'feature|bugfix')
CONTAINS_TEST=$(git diff --name-only $RANGE | grep -E '^test_')

if [[ $(git log --format=medium --no-merges "$RANGE" | grep "\[notest\]") ]]
then
echo "[notest] is present - skipping the check for the test requirement"
elif [ -n $NEEDS_TEST ] && ![ -n $CONTAINS_TEST ]; then
echo "Every feature and bugfix should come with a test."
exit 1
fi

Copy link
Member

Choose a reason for hiding this comment

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

I had a similar approach at pulp_file and it didn't work as I expected:

Could you add a changelog entry .feature to verify if it is working?

Copy link
Member Author

Choose a reason for hiding this comment

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

I actually took the code from that PR, I will test with .feature entry

Copy link
Member Author

Choose a reason for hiding this comment

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

the travis still does not work as expected, i need to look more into this.

@ipanova
Copy link
Member Author

ipanova commented Oct 8, 2020

this is ready for review, to see whether script is correct please refer to this PR build #1865
https://travis-ci.com/github/pulp/pulp_rpm/jobs/396943266

@dralley
Copy link
Contributor

dralley commented Oct 15, 2020

@ipanova All of the documentation changes look good to me, and most of the Travis changes do -- but I am not quite fluent enough with bash to give a proper review of those parts.

@ggainey ggainey merged commit 36a5f0d into pulp:master Oct 22, 2020
@fao89
Copy link
Member

fao89 commented Oct 26, 2020

@ipanova++

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.

None yet

8 participants