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

ci: add interrogate to github actions & exclude some directories #3612

Merged
merged 4 commits into from
Jan 4, 2024

Conversation

ayushthe1
Copy link
Contributor

fixes #3499

Added "interrogate" to github actions and excluded some directories inpre-commit-config.ymlfile to increase coverage

@ayushthe1
Copy link
Contributor Author

hey @terriko ,can you please take a look at this PR. The issue was assigned to someone else but progress on it is stale as the assigne is on break.

@codecov-commenter
Copy link

codecov-commenter commented Dec 17, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (78a49d8) 78.85% compared to head (87608b1) 79.10%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3612      +/-   ##
==========================================
+ Coverage   78.85%   79.10%   +0.25%     
==========================================
  Files         797      797              
  Lines       11944    11944              
  Branches     1603     1603              
==========================================
+ Hits         9418     9448      +30     
+ Misses       2080     2058      -22     
+ Partials      446      438       -8     
Flag Coverage Δ
longtests 73.84% <ø> (+0.05%) ⬆️
win-longtests 77.11% <ø> (+0.21%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ayushthe1 ayushthe1 changed the title add interrogate to github actions & exclude some directories CI : add interrogate to github actions & exclude some directories Dec 17, 2023
Copy link
Contributor

@terriko terriko left a comment

Choose a reason for hiding this comment

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

Hm, this isn't working:

 | test/test_scanner.py                             |    12 |    6 |     6 |    50% |
| test/test_source_epss.py                         |     3 |    3 |     0 |     0% |
| test/test_source_gad.py                          |     8 |    8 |     0 |     0% |
| test/test_source_nvd.py                          |     5 |    5 |     0 |     0% |
| test/test_source_osv.py                          |     8 |    8 |     0 |     0% |
| test/test_source_redhat.py                       |     5 |    5 |     0 |     0% |
| test/test_strings.py                             |     5 |    1 |     4 |    80% |
| test/test_triage.py                              |     1 |    1 |     0 |     0% |
| test/test_util.py                                |     5 |    2 |     3 |    60% |
| test/test_version.py                             |     3 |    3 |     0 |     0% |
| test/test_version_compare.py                     |     5 |    0 |     5 |   100% |
| test/utils.py                                    |     7 |    5 |     2 |    29% |
| test/pages/html_report.py                        |     4 |    4 |     0 |     0% |
|--------------------------------------------------|-------|------|-------|--------|
| TOTAL                                            |  1101 |  674 |   427 |  38.8% |
---------------- RESULT: FAILED (minimum: 60.0%, actual: 38.8%) ----------------

It looks like -e test/ isn't doing what I expected so it's still checking all of the test directory. Can you see if you can fix it? I'm not sure if it needs to be test/* or if we need to have more of the directory structure in there when it's run in the linting.yml job or what, but I'm sure you can figure it out from the interrogate docs and some experimentation in github actions.

@terriko terriko changed the title CI : add interrogate to github actions & exclude some directories ci : add interrogate to github actions & exclude some directories Dec 19, 2023
@terriko
Copy link
Contributor

terriko commented Dec 19, 2023

Also, i edited your PR title because gitlint doesn't like "CI" capitalized and it needs to be "ci" so that check should resolve itself next time you run the tests by updating this PR

@ayushthe1
Copy link
Contributor Author

@terriko I have done some changes and the interrogate linter passes now. Could you please take a look. Also thanks for pointing out the silly gitlint error i made 😅

image

@ayushthe1 ayushthe1 changed the title ci : add interrogate to github actions & exclude some directories ci: add interrogate to github actions & exclude some directories Dec 21, 2023
@terriko
Copy link
Contributor

terriko commented Dec 28, 2023

Thanks for figuring out the pass_filenames thing! I'm going to update the branch for tests and I'll be back once those re-run.

@terriko terriko added awaiting maintainer Need a maintainer to respond / help out awaiting CI and removed awaiting maintainer Need a maintainer to respond / help out labels Dec 28, 2023
@terriko
Copy link
Contributor

terriko commented Jan 4, 2024

Updating again for tests.

Copy link
Contributor

@terriko terriko left a comment

Choose a reason for hiding this comment

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

yay, we're all set to merge! Then next up is some targetted improvement of files so we can expect more than 60% in the future.

@terriko terriko merged commit 1449fd1 into intel:main Jan 4, 2024
22 checks passed
inosmeet pushed a commit to inosmeet/cve-bin-tool that referenced this pull request Feb 16, 2024
…el#3612)

* add interrogate

* add pass_filename to the hook

---------

Co-authored-by: Terri Oda <terri.oda@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ci: add interrogate to github actions
3 participants