Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ jobs:
command: test
args: --locked

- name: All Features
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features

# This job reports the results of the test matrix above
test:
if: always()
Expand Down
1 change: 0 additions & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ rust-version = "1.60"

[features]
default = ["selfmanage"]
phylum-online = []
selfmanage = []
extensions = ["dep:deno_ast", "dep:deno_core"]

Expand Down
2 changes: 1 addition & 1 deletion cli/src/bin/phylum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ async fn handle_commands() -> CommandResult {
"uninstall" => handle_uninstall(matches),

#[cfg(feature = "extensions")]
"extensions" => handle_extensions(matches).await,
"extension" => handle_extensions(matches).await,

#[cfg(feature = "extensions")]
extension_subcmd => Extension::load(extension_subcmd)?.run().await,
Expand Down
98 changes: 0 additions & 98 deletions cli/tests/cmd.rs

This file was deleted.

10 changes: 3 additions & 7 deletions cli/tests/extensions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,13 @@ fn can_run_installed_extension() {
.assert()
.success();

let cmd = Command::cargo_bin("phylum")
Command::cargo_bin("phylum")
.unwrap()
.env("XDG_DATA_HOME", &tmp_dir)
.arg("sample-extension")
.assert()
.success();

// TODO match the output of the sample extension to ensure it executed properly. #357
// TODO build a proper fixture which prints some output.
let output = std::str::from_utf8(&cmd.get_output().stdout).unwrap();
println!("{}", output);
.success()
.stdout("Hello, World!\n");
}

// When a user installs a valid extension it should print a message indicating
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name = "ping"
description = "This extension should be filtered out"
entry_point = "sample_extension.sh"
entry_point = "main.ts"
1 change: 1 addition & 0 deletions cli/tests/fixtures/extensions/ping-extension/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Deno.core.print("Hello, world!\n");

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name = "sample-extension"
description = "This extension does a thing"
entry_point = "sample_extension.sh"
entry_point = "main.ts"
1 change: 1 addition & 0 deletions cli/tests/fixtures/extensions/sample-extension/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Deno.core.print("Hello, World!\n");

This file was deleted.