Skip to content

feat(jans-cedarling): add WASM bindings for Cedarling #300

feat(jans-cedarling): add WASM bindings for Cedarling

feat(jans-cedarling): add WASM bindings for Cedarling #300

name: Cedarling Testcases
on:
pull_request:
branches:
- main
paths:
- "jans-cedarling/**"
permissions:
contents: read
jobs:
rust_tests:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
with:
egress-policy: audit
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Run Tests
run: |
cd ./jans-cedarling
cargo test --workspace
- name: Run Clippy on native target
run: |
cd ./jans-cedarling
cargo clippy -- -Dwarnings
wasm_tests:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
with:
egress-policy: audit
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install WASM dependencies
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Run WASM tests using chrome
run: |
cd ./jans-cedarling/bindings/cedarling_wasm
wasm-pack test --headless --chrome
- name: Run WASM tests using firefox
run: |
cd ./jans-cedarling/bindings/cedarling_wasm
wasm-pack test --headless --firefox
- name: Run Clippy on WASM target
run: |
cd ./jans-cedarling
cargo clippy --target wasm32-unknown-unknown -- -Dwarnings
python_tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
steps:
- name: Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
with:
egress-policy: audit
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install tox
- name: Test with pytest
run: |
cd ./jans-cedarling/bindings/cedarling_python
tox