Optionally build and run application and examples during testing #76

Open
opened 2025-03-26 19:52:51 +00:00 by Vectornaut · 1 comment
Member

Goal

The continuous integration workflow set up in pull request #75 verifies three things:

  • The application builds without errors or warnings.
  • The automated tests pass, and they build without warnings.
  • The examples build and run without errors or warnings.

It's useful to do these checks as separate jobs, because it makes the continuous integration report more granular. During local development, however, it would be nice to have a convenient way to run all three checks together.

Implementation ideas

If we give our examples the #[test] attribute, but ignore them unless a certain feature flag is set, we should be able to run the examples alongside the automated tests by calling

cargo test --examples --feature [whatever flag name we choose]
## Goal The continuous integration workflow set up in pull request #75 verifies three things: - The application builds without errors or warnings. - The automated tests pass, and they build without warnings. - The examples build and run without errors or warnings. It's useful to do these checks as separate jobs, because it makes the continuous integration report more granular. During local development, however, it would be nice to have a convenient way to run all three checks together. ## Implementation ideas If we [give](https://internals.rust-lang.org/t/examples-and-tests/14347/9) our examples the `#[test]` attribute, but [ignore](https://stackoverflow.com/a/48585979) them unless a certain feature flag is set, we should be able to run the examples alongside the automated tests by calling ``` cargo test --examples --feature [whatever flag name we choose] ```
Vectornaut added the
enhancement
prospective
labels 2025-03-26 19:52:51 +00:00
Owner

I am presuming this scheme has no WASM-bundle footprint when compiled for deployment. If so, sounds perfectly reasonable to me.

I am presuming this scheme has no WASM-bundle footprint when compiled for deployment. If so, sounds perfectly reasonable to me.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: StudioInfinity/dyna3#76
No description provided.