kubewarden / github-actions

GitHub actions used by the Kubewarden project
https://kubewarden.io
Apache License 2.0
4 stars 7 forks source link

feat: github action to install cargo-tarpaulin #113

Closed jvanz closed 5 months ago

jvanz commented 6 months ago

Description

his action downloads latest stable release of cargo-tarpaulin and installs that inside of the GitHub action path.

Fix https://github.com/kubewarden/kubewarden-controller/issues/667

viccuad commented 6 months ago

Thanks for tackling this.

Agree with Flavio. Maybe a solution is to use cargo binstall, which does the work of checking crates.io, and going to the GH releases to fetch the provided binaries.

They provide a minimal GH action, that we can just copy-paste into our actions, see https://github.com/cargo-bins/cargo-binstall?tab=readme-ov-file#in-github-actions.

flavio commented 6 months ago

We have to download the tarball from the tarpaulin release page and put the cargo-tarpaulin binary into the $PATH. We can copy&paste https://github.com/kubewarden/github-actions/tree/main/crane-installer and adapt it.

Once the cargo-tarpaulin is into the $PATH, cargo will automatically find it when cargo tarpaulin is invoked