Skip to content

Commit

Permalink
Working on workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
1BADragon committed Apr 21, 2024
1 parent 25fd6dc commit 6856ec5
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 27 deletions.
47 changes: 21 additions & 26 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,7 @@ jobs:
- uses: Swatinem/rust-cache@v2

- name: Build
run: make build

build-python-bindings:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: Swatinem/rust-cache@v2

- name: Build
run: make python-binding-release

build-wasm-bindings:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: Swatinem/rust-cache@v2

- name: install wasm-pack
run: cargo install wasm-pack

- name: Build
run: make wasm-binding-release
run: cargo build --workspace

test-all:
runs-on: ubuntu-latest
Expand All @@ -66,4 +41,24 @@ jobs:
env:
RSCEL_TEST_PROTO: 1

deploy:
runs-on: ubuntu-latest
needs: test-all
if: success() && github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3

- uses: Swatinem/rust-cache@v2

- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: login to crates.io
run: cargo login ${{ secrets.CRATES_IO_API_KEY }}

- name: publish
run: cargo publish -p rscel --dry-run


3 changes: 3 additions & 0 deletions rscel/src/tests/general_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ fn test_contains() {
#[test_case(r#""\X48""#, "H".into(); "Test hex escape upper")]
#[test_case("'fooBaR'.endsWithI('bar')", true.into(); "Test endsWithI")]
#[test_case("'FoObar'.startsWithI('foo')", true.into(); "Test startsWithI")]
#[test_case("' foo '.trim()", "foo".into(); "Test trim")]
#[test_case("' foo '.trim_start()", "foo ".into(); "Test trim_start")]
#[test_case("' foo '.trim_end()", " foo".into(); "Test trim_end")]
fn test_equation(prog: &str, res: CelValue) {
let mut ctx = CelContext::new();
let exec_ctx = BindContext::new();
Expand Down
2 changes: 1 addition & 1 deletion wasm/src/into_jsvalue.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use wasm_bindgen::JsValue;

use rscel::{CelError, CelValue, ProgramDetails};
use rscel::{CelError, CelValue};

use crate::{eval_error::WasmCelError, from_jsvalue::WasmCelValue};

Expand Down

0 comments on commit 6856ec5

Please sign in to comment.