Skip to content

Commit

Permalink
Create cli-features.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
saulecabrera committed Jul 8, 2024
1 parent 9d040af commit 671a984
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 13 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,7 @@ jobs:
path: target/wasm32-wasi/release/

- name: Test CLI
env:
CARGO_PROFILE_RELEASE_LTO: off
run: |
cargo build --package=javy-core --target=wasm32-wasi --release
cargo test --package=javy-cli --release -- --nocapture
cargo build --package=javy-core --target=wasm32-wasi --release --features=experimental_event_loop
cargo test --package=javy-cli --features=experimental_event_loop --release -- --nocapture
run: CARGO_PROFILE_RELEASE_LTO=off cargo test --package=javy-cli --release -- --nocapture

- name: Check benchmarks
run: CARGO_PROFILE_RELEASE_LTO=off cargo check --package=javy-cli --release --benches
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/cli-features.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Tests extra CLI features as and their dependency with core features.
name: Test CLI Features
on:
push:
branches:
- main
pull_request:

jobs:
cli:
name: test_cli
runs_on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/ci-shared-setup
with:
os: linux

- name: Test `experimental_event_loop`
run: |
cargo build --package=javy-core --target=wasm32-wasi --release --features=experimental_event_loop
cargo test --package=javy-cli --features=experimental_event_loop --release -- --nocapture
6 changes: 1 addition & 5 deletions crates/cli/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,7 @@ fn test_logging() -> Result<()> {
"hello world from console.log\nhello world from console.error\n",
logs.as_str(),
);
if cfg!(feature = "experimental_event_loop") {
assert_fuel_consumed_within_threshold(39602, fuel_consumed);
} else {
assert_fuel_consumed_within_threshold(34169, fuel_consumed);
}
assert_fuel_consumed_within_threshold(34169, fuel_consumed);
Ok(())
}

Expand Down

0 comments on commit 671a984

Please sign in to comment.