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 software tests and CI configuration #39

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

amotl
Copy link
Contributor

@amotl amotl commented Aug 1, 2022

Dear Frederic,

this patch will add some software tests and a CI/GHA configuration. It works well already, see below. I believe it will tremendously help with future maintenance.

With kind regards,
Andreas.

image
-- https://github.com/cicerops/check_synology/actions/runs/2777733734

@amotl amotl marked this pull request as draft August 1, 2022 20:56

lint: setup-virtualenv
$(pip) install --requirement=requirements-utils.txt
$(flake8) --exit-zero *.py
Copy link
Contributor Author

@amotl amotl Aug 1, 2022

Choose a reason for hiding this comment

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

With --exit-zero, it will currently not bail out on any findings. We will satisfy the linters with a subsequent patch.

$(MAKE) proselint

proselint:
$(proselint) *.md || true
Copy link
Contributor Author

@amotl amotl Aug 1, 2022

Choose a reason for hiding this comment

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

Same here. Let's start in relaxed mode. || true will turn any failure exit code into a positive outcome.

@amotl amotl marked this pull request as ready for review August 3, 2022 01:23
@amotl
Copy link
Contributor Author

amotl commented Aug 3, 2022

Hi Frederic,

I think this will be good to go. While the few test cases only bring in a code coverage of about 10%, at least the infrastructure will be in place. I will submit another patch which exercises the code base more thoroughly 1.

With kind regards,
Andreas.

Footnotes

  1. May take some time, have to get my machine fixed beforehand and vacation is near.

@amotl
Copy link
Contributor Author

amotl commented Aug 7, 2022

Hi Frederic,

it may take a few more days to get my machine fixed, so I think all other work on this topic can be submitted with subsequent patches. I think it is good for a patch, mainly focused on enabling CI, anyway. In other words: Feel free to merge, in order to get the test infrastructure in place.

With kind regards,
Andreas.

@amotl
Copy link
Contributor Author

amotl commented Aug 8, 2022

Hi Frederic,

my machine got fixed quickly, so I will be able to continue to work a bit on the test harness. Do you have any objections against merging this PR as a baseline beforehand? I will submit subsequent work as separate PRs.

With kind regards,
Andreas.

@amotl
Copy link
Contributor Author

amotl commented Aug 9, 2022

The followup patch will be cicerops/check_synology@add-ci...more-tests, submitted with #40 as a draft, bumping the code coverage from 10% to 27% by exercising the load mode for real. It will have to be extended to exercise all other modes and cleaned up a bit before submitting it.

@wernerfred
Copy link
Owner

Thx for that contribution. Sadly i'm super short on time in the last weeks - I promise i did not forget this addition but i would like to go through everything in detail before merging - and this needs time

@amotl
Copy link
Contributor Author

amotl commented Sep 16, 2022

Dear Frederic,

thank you. I remembered this patch yesterday as well, sweet that we apparently both did at about the same time ;]. Please take your time to review the patch properly.

With kind regards,
Andreas.

@amotl
Copy link
Contributor Author

amotl commented Oct 13, 2022

Friendly bump ;]. As a few reports about potential edge cases are arriving on the issue tracker, and because there are a few contributions not merged yet, like #9, #41 and #46 (thanks a stack, @dommi22m and @bigitag!), I think it would be good to have a test harness in place.

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.

2 participants