enarx-archive / demo

A demonstration of various Enarx components
Apache License 2.0
9 stars 8 forks source link

Add Travis config to run rustfmt test #22

Closed mbestavros closed 5 years ago

mbestavros commented 5 years ago

To enforce proper formatting standards on Enarx projects, we'd like to run cargo fmt on all incoming pull requests to Enarx projects. This enables the appropriate test using Travis CI.

Resolves #11.

mbestavros commented 5 years ago

I've amended the tests to also run in the amd-sev subdirectory. That crate isn't properly formatted yet, which is why tests are failing. I can roll the formatting into this patch, or make a separate one if preferred.

npmccallum commented 5 years ago

One pull request with two commits please.

npmccallum commented 5 years ago

I can't believe I missed the obvious solution to all this. Make the parent directory a Cargo workspace.

https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html

mbestavros commented 5 years ago

Agreed, that is the cleanest way to get what we need. How should I approach making that change? Separate commit adding the workspace before adding travis.yml?

npmccallum commented 5 years ago

Yup. Logical commits.

mbestavros commented 5 years ago

@npmccallum This is now rebased on @steveeJ's now-merged demo, with some additional fixes. Ready for a look.

mbestavros commented 5 years ago

@npmccallum @steveeJ I've amended the new Travis config in this PR to include a cargo-audit test, and fixed a change being in the wrong commit. Ready for re-review.

steveej commented 5 years ago

Looks like cargo audit is already revealing vulnerable dependencies for us. I suggest to bump them in a separate PR and rebase this one.

mbestavros commented 5 years ago

@steveeJ I noticed that. It seemed like it was a broken dependency in a Wasmtime crate, so I don't know if we can bump that ourselves.

Regardless, I've removed the audit check and will add it back in once this is merged.

mbestavros commented 5 years ago

@steveeJ I've reworded most of the commits; they should match up with the logical changes in each of them better now.