feat: javascript examples #159
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI-Lint-And-Test | |
on: | |
workflow_call: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
merge_group: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
BLITZAR_BACKEND: cpu | |
jobs: | |
# Run cargo check (with various feature permutations) | |
check: | |
name: Check Package | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-check-${{ hashFiles('**/Cargo.toml') }} | |
- name: Install stable toolchain | |
run: curl https://sh.rustup.rs -sSf | bash -s -- -y --profile minimal && source ~/.cargo/env | |
- name: Install Dependencies | |
run: export DEBIAN_FRONTEND=non-interactive && sudo apt-get update && sudo apt-get install -y clang lld protobuf-compiler | |
- name: Run cargo check (default features and packages) | |
run: cargo check --all-targets | |
- name: Run cargo check (wasm package) | |
run: cargo check --all-targets --package sxt-proof-of-sql-sdk-wasm | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.toml') }} | |
- name: Install stable toolchain | |
run: | | |
curl https://sh.rustup.rs -sSf | bash -s -- -y --profile minimal && source ~/.cargo/env | |
rustup component add clippy | |
- name: Install Dependencies | |
run: export DEBIAN_FRONTEND=non-interactive && sudo apt-get update && sudo apt-get install -y clang lld protobuf-compiler | |
- name: Run clippy (default features and packages) | |
run: cargo clippy --all-targets -- -D warnings | |
- name: Run clippy (wasm package) | |
run: cargo clippy --all-targets --package sxt-proof-of-sql-sdk-wasm -- -D warnings | |
# Run cargo fmt --all -- --config imports_granularity=Crate,group_imports=One --check | |
format: | |
name: Format | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install stable toolchain | |
run: | | |
curl https://sh.rustup.rs -sSf | bash -s -- -y --profile minimal && source ~/.cargo/env | |
rustup component add rustfmt | |
- name: Run cargo fmt | |
run: cargo fmt --all -- --config imports_granularity=Crate,group_imports=One --check | |
udeps: | |
name: Unused Dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install nightly toolchain | |
run: | | |
curl https://sh.rustup.rs -sSf | bash -s -- -y --profile minimal && source ~/.cargo/env && rustup default nightly | |
cargo install cargo-udeps --locked | |
- name: Install Dependencies | |
run: export DEBIAN_FRONTEND=non-interactive && sudo apt-get update && sudo apt-get install -y clang lld protobuf-compiler | |
- name: Run cargo udeps | |
run: cargo +nightly udeps --all-targets |