zerocopy icon indicating copy to clipboard operation
zerocopy copied to clipboard

Make it easier to run CI tests locally

Open joshlf opened this issue 3 years ago • 3 comments

We currently run a large suite of tests in CI, which includes testing with different tools across different toolchains and different targets. It also involves miscellaneous things like confirming that README.md is up to date, that code is properly formatted with rustfmt, etc. In other words, it's not as simple as just running cargo test.

As a result, it's easy to make changes that appear fine locally but break CI, requiring an edit-commit-push cycle just to see if all of the CI tests will pass. We should make it easier to run most or all of these tests locally. For especially fast tests (like README.md and code formatting), we could even provide them as commit hooks.

The challenge here is going to be making these tests available without either a) moving everything out of our ci.yml and into a script (which means we don't get nice job output and error messages) or, b) duplicating everything (which is brittle).

joshlf avatar Oct 16 '22 20:10 joshlf

You could also look into something like Toast.

AntoniosBarotsis avatar Oct 16 '22 21:10 AntoniosBarotsis

Some interesting tools in this space are

memark avatar Oct 16 '22 21:10 memark

One thing to keep in mind is that Act and I think Toast as well don't support Windows images (or at least didn't last time I tried IIRC).

AntoniosBarotsis avatar Oct 16 '22 21:10 AntoniosBarotsis

I struggled specifically with formatting and forgetting to make stderr match in tests. Adding a way to format test files and an easier way to update all the stderr files for tests might be helpful. 🙂

djkoloski avatar Nov 06 '22 01:11 djkoloski

Awesome, added that to the issue description. This'll definitely be important to solve moving forward.

joshlf avatar Nov 06 '22 02:11 joshlf

@djkoloski I took a stab at pulling the scripts out of ci.yml and into a shell script here. There's still work to be done, but I probably won't get it to a state where I can merge for a few days, so I figured I'd send you that in case you want to just keep a copy of it locally until I get it merged.

joshlf avatar Nov 06 '22 20:11 joshlf

@djkoloski do you feel like https://github.com/google/zerocopy/pull/728 and https://github.com/google/zerocopy/pull/1171 combined are sufficient to close this issue?

joshlf avatar May 03 '24 11:05 joshlf

Yes, this issue can be closed.

djkoloski avatar May 03 '24 12:05 djkoloski