Skip to content

Add software tests and CI configuration#39

Open
amotl wants to merge 8 commits intowernerfred:masterfrom
cicerops:add-ci
Open

Add software tests and CI configuration#39
amotl wants to merge 8 commits intowernerfred:masterfrom
cicerops:add-ci

Conversation

@amotl
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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