-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add: Javascript integration tests with yarn link
#114
Conversation
⏱ Workflow Timer ⏱ Make sure you keep an eye on build times! One of this project's goals is to keep CI runs under 5 minutes so developers can maintain fast edit-compile-test cycles.
🤖 Beep. Boop. I'm a bot. If you find any issues, please report them to https://github.com/Michael-F-Bryan/workflow-timer. |
…with no error handling
c0246e5
to
be6eb5d
Compare
// println!("{:?}", manifest_path); | ||
|
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.
This can be deleted.
@@ -1,18 +0,0 @@ | |||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. |
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.
Did you mean to delete this lockfile?
integration-tests/tests/examples.rs
Outdated
@@ -15,6 +15,7 @@ fn initialize_logging() { | |||
} | |||
|
|||
#[test] | |||
#[ignore = "Python tests not working on mac os"] |
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.
We should be able to refine this so it only ignores the test on macos.
#[ignore = "Python tests not working on mac os"] | |
#[cfg_attr(target_os = "macos", ignore = "Python tests not working on mac os")] |
The #[cfg_attr]
attribute is useful for enabling attributes only under certain conditions.
crates/testing/src/autodiscover.rs
Outdated
// setup_python(crate_dir, &bindings)?; | ||
// run_pytest(crate_dir)?; |
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.
Instead of commenting these lines out, let's update run_pytest()
so it does a check for MacOS at the start.
fn run_pytest(crate_dir: &Path) -> Result<(), Error> {
if cfg!(target_os = "macos") {
tracing::warn!(
issue = "https://github.com/wasmerio/wasmer-python/issues/657",
"Skipping python tests on MacOS",
);
return Ok(());
}
...
}
crates/testing/src/autodiscover.rs
Outdated
@@ -127,7 +136,7 @@ fn language_specific_matches(package_dir: &Path, language: Language) -> Result<W | |||
let mut builder = OverrideBuilder::new(package_dir); | |||
|
|||
let overrides = match language { | |||
Language::JavaScript => todo!(), | |||
Language::JavaScript => builder.add("*.js")?.add("*.test.js")?.build()?, |
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.
Do we also want to add *.ts
and *.mjs
?
let mut cmd = Command::new("yarn"); | ||
cmd.arg("init").arg("--yes").current_dir(crate_dir); | ||
tracing::info!(?cmd, "Initializing the Javascript package"); |
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.
We're always going to initialize a new package.json
even if one already exists, won't we?
Javascript Testing in Integration Suite
Using:
link
serde_json
Not Done: