Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cargo test dummy_issuer to CI #25

Merged
merged 6 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI Checks
name: JS Library Checks

on:
pull_request:
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
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

- name: Install Rust
run: |
rustup component add rustfmt
rustup component add clippy

- 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

# 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
# Run only dummy_issuer to avoid building dummy_relying_party
- name: Cargo tests
run: cargo test --package dummy_issuer
Loading