Browse Source

Cache `cargo-tarpaulin` binary (#3071)

* Cache `cargo-tarpaulin` binary

* Action test
pull/3077/head
José Julián Espina 1 year ago committed by GitHub
parent
commit
1e3fe4b4c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      .github/workflows/rust.yml
  2. 2
      boa_wasm/src/lib.rs

4
.github/workflows/rust.yml

@ -22,10 +22,10 @@ jobs:
toolchain: stable toolchain: stable
override: true override: true
profile: minimal profile: minimal
- uses: actions-rs/install@v0.1 - name: Install cargo-tarpaulin
uses: baptiste0928/cargo-install@v2.1.0
with: with:
crate: cargo-tarpaulin crate: cargo-tarpaulin
version: latest
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
with: with:
key: tarpaulin key: tarpaulin

2
boa_wasm/src/lib.rs

@ -71,7 +71,7 @@ fn main() {
/// Evaluate the given ECMAScript code. /// Evaluate the given ECMAScript code.
#[wasm_bindgen] #[wasm_bindgen]
pub fn evaluate(src: &str) -> Result<String, JsValue> { pub fn evaluate(src: &str) -> Result<String, JsValue> {
// Setup executor // Setup the executor
Context::default() Context::default()
.eval(Source::from_bytes(src)) .eval(Source::from_bytes(src))
.map_err(|e| JsValue::from(format!("Uncaught {e}"))) .map_err(|e| JsValue::from(format!("Uncaught {e}")))

Loading…
Cancel
Save