osv-scanner icon indicating copy to clipboard operation
osv-scanner copied to clipboard

ci: setup workflow to run `semantic` tests weekly

Open G-Rath opened this issue 1 year ago • 1 comments

Cherry-pick of https://github.com/G-Rath/osv-detector/pull/182


This setups up a dedicated workflow for running the semantic test suite using the latest generated fixtures:

  • every sunday
  • whenever a generator or the workflow is changed
  • via a workflow_dispatch

This helps ensure high confidence in semantic across ecosystems; the workflow also exports the generated files as an artifact which makes it easy to update the committed version of each fixture without requiring the native ecosystem components (i.e. Ruby, Java, R, etc) to be installed.

Note currently this is using v3 of the artifact actions - I'll upgrade to v4 in a follow-up PR, since it will require further work due to them switching to using immutable artifacts.

At some point I'm also keen to explore this for the API side since the logic should be pretty much the same

G-Rath avatar May 01 '24 19:05 G-Rath

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 65.32%. Comparing base (0753337) to head (856e26a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #958      +/-   ##
==========================================
- Coverage   65.35%   65.32%   -0.03%     
==========================================
  Files         150      150              
  Lines       12535    12535              
==========================================
- Hits         8192     8189       -3     
- Misses       3883     3885       +2     
- Partials      460      461       +1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar May 01 '24 19:05 codecov-commenter

Ok so now we have support for Alpine which ideally we should run as part of this, but I found that can take hours when running through docker - for implementing that I did end up compiling a custom binary from the actual C code which was blazingly fast but I'm not sure if there's a way we can easily make that an option?

I'm thinking for now I'll just omit the Alpine generator, and make an issue for adding it + try to explore how we might be able make it faster (such as running the whole generator in a docker container)

G-Rath avatar Jun 11 '24 21:06 G-Rath

Currently broken due to #1055

G-Rath avatar Jun 21 '24 00:06 G-Rath