Skip to content

feat: make ic-repl work against PocketIC #377

feat: make ic-repl work against PocketIC

feat: make ic-repl work against PocketIC #377

Workflow file for this run

name: Tests
on:
push:
branches:
- master
pull_request:
jobs:
test:
runs-on: ubuntu-latest
env:
DFX_VERSION: 0.24.1
steps:
- uses: actions/checkout@v4
- name: Install stable Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- name: Cache cargo build
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: cargo build
- name: Run tests
run: cargo test
- name: fmt
run: cargo fmt -v -- --check
- name: lint
run: cargo clippy --tests -- -D clippy::all
- name: Install dfx
uses: dfinity/setup-dfx@main
with:
dfx-version: "${{ env.DFX_VERSION }}"
- name: Run e2e tests against replica
run: |
echo '{}' > dfx.json
dfx start --background --clean
set -ex
target/debug/ic-repl examples/install.sh
target/debug/ic-repl examples/func.sh
dfx stop
- name: Run e2e tests against PocketIC
run: |
echo '{}' > dfx.json
dfx start --background --clean --pocketic
set -ex
target/debug/ic-repl examples/install.sh
target/debug/ic-repl examples/func.sh
dfx stop