Bump nanoid in /js-library #156
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: Cargo Tests | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
id: cache | |
with: | |
path: | | |
~/.cargo | |
target | |
key: cargo-${{ hashFiles('rust-toolchain.toml', 'Cargo.lock') }} | |
restore-keys: cargo- | |
- name: Install Rust | |
run: | | |
rustup component add rustfmt | |
rustup component add clippy | |
cargo --version | |
- name: Check Format | |
run: cargo fmt --all -- --check | |
# fails if lockfile is out of date | |
# https://users.rust-lang.org/t/check-if-the-cargo-lock-is-up-to-date-without-building-anything/91048/5 | |
- name: Cargo Lockfile Check | |
run: cargo update --workspace --locked | |
- name: Install PocketIC | |
run: | | |
curl -sL -o pocket-ic.gz https://github.com/dfinity/pocketic/releases/download/4.0.0/pocket-ic-x86_64-linux.gz | |
gzip -d pocket-ic.gz | |
chmod +x pocket-ic | |
echo "POCKET_IC_BIN=$(pwd)/pocket-ic" >> $GITHUB_ENV | |
- name: Install ic-wasm | |
run: cargo install ic-wasm --version 0.3.5 | |
- name: Build Wasm Dummy Issuer | |
working-directory: dummy-issuer | |
run: ./build.sh | |
- name: Create dist folder | |
run: mkdir -p dummy-relying-party/frontend/dist | |
- name: Cargo tests | |
run: cargo test |