microsoft / regorus

Regorus - A fast, lightweight Rego (OPA policy language) interpreter written in Rust.
MIT License
130 stars 31 forks source link

Add test-ruby CI for github actions #244

Closed thedavemarshall closed 4 months ago

thedavemarshall commented 4 months ago

This change adds a test-ruby CI workflow that is triggered on pushes and pull requests to main, and will run the default rake task of compile test rubocop.

Happy to change the naming or triggers here, but wanted to see what it would take to get the ruby test suite run as part of CI.

see https://github.com/oxidize-rb/actions/blob/main/setup-ruby-and-rust/readme.md for docs on the rust and ruby setup action.

see https://github.com/thedavemarshall/regorus/actions/runs/9142734035/job/25138614189 for an example run of this workflow.

thedavemarshall commented 4 months ago

@anakrish Is this the approach you were thinking for https://github.com/microsoft/regorus/issues/242 ?

anakrish commented 4 months ago

@thedavemarshall Looks great! Thanks for taking this on.

One question: How trustworthy is oxidize-rb/actions/setup-ruby-and-rust@v1?

thedavemarshall commented 4 months ago

@anakrish Great question! I'm not a security expert or rust expert, and I'm also relatively new to GitHub actions, but here's what I've found. The summary is that I would trust this action, but I'm happy to try a different approach if you'd prefer!

anakrish commented 4 months ago

@thedavemarshall Thanks for the investigation. Based on your findings, I agree with you that it is reasonable to trust oxidize-rb since we already trust rb-sys. Additionally, magnus also uses oxidize-rb in its CI:

https://github.com/matsadler/magnus/blob/324f57e44da5948ea146639d0c2330bc26c8b911/.github/workflows/test.yaml#L50

Also, bytecodealliance in your list is focused on security.

Based on all the above, I'm OK to trust oxidize-rb.

anakrish commented 4 months ago

@thedavemarshall This PR inspired me to do #247.