-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cargo test dummy_issuer to CI (#25)
# Motivation Do not add breaking changes to dummy_issuer accidentally. In this PR, I add the integration tests of the dummy_issuer to the CI. # Changes * New workflow "Rust" to build the wasm and execute the tests. # Tests Already running in the PR. # Todos - [ ] Add entry to changelog (if necessary). Not necessary.
- Loading branch information
Showing
2 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: CI Checks | ||
name: JS Library Checks | ||
|
||
on: | ||
pull_request: | ||
|
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
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 |