-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(sound): check sound files in rust tests #282
Conversation
0e96adf
to
c742f22
Compare
.github/workflows/rust-ci.yaml
Outdated
@@ -148,8 +149,8 @@ jobs: | |||
cat ${GITHUB_ENV} | |||
- name: Cargo Test | |||
run: | | |||
nix develop -c \ | |||
cargo test --all --all-features --all-targets $EXCLUDES | |||
SOUNDS_DIR=$(pwd)/ui/sound/assets nix develop -c \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't like setting this variable here but i didn't find a better approach :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets use a config struct rather than this global env var
.github/workflows/rust-ci.yaml
Outdated
@@ -148,8 +149,8 @@ jobs: | |||
cat ${GITHUB_ENV} | |||
- name: Cargo Test | |||
run: | | |||
nix develop -c \ | |||
cargo test --all --all-features --all-targets $EXCLUDES | |||
SOUNDS_DIR=$(pwd)/ui/sound/assets nix develop -c \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets use a config struct rather than this global env var
4efdcd4
to
ae17f2c
Compare
use std::time::Duration; | ||
|
||
struct MockJetson { | ||
sound_files: Arc<DashMap<Type, SoundFile>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need a DashMap when we aren't mutating this variable?
instead of invoking soxi check that all files are present in the assets check bits per sample (16 bits) sounds directory based on cargo manifest path for tests. tests are run with all other rust tests
ae17f2c
to
7666a97
Compare
instead of invoking soxi
check that all files are present in the assets
check bits per sample (16 bits)
SOUNDS_DIR can be overwritten at runtime with an env variable tests are run with all other rust tests