Skip to content

Commit

Permalink
Merge pull request #82 from internet-computer-protocol/test-candid-rpc
Browse files Browse the repository at this point in the history
Set up IC state machine tests
  • Loading branch information
rvanasa authored Nov 20, 2023
2 parents 8cf4bff + e4aee21 commit ad0961b
Show file tree
Hide file tree
Showing 9 changed files with 4,360 additions and 572 deletions.
95 changes: 13 additions & 82 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,19 @@ on:
paths-ignore:
- "README.md"
jobs:
# cargo-fmt:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@master
# - name: Cargo fmt
# run: |
# rustup component add rustfmt
# cargo fmt --all -- --check

cargo-clippy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master

- uses: Swatinem/rust-cache@v2

- name: Install Protoc
uses: arduino/setup-protoc@v2

- run: rustup component add clippy

- name: Cargo clippy
# We run clippy twice (once without tests), so that it accurately reports dead code in the non-test configuration.
# `manual_range_contains` is disabled because a >= x && a < y reads more clearly than (x..y).contains(a) and
Expand All @@ -34,85 +31,19 @@ jobs:
cargo clippy -- -D clippy::all -D warnings -A clippy::manual_range_contains
cargo clippy --tests --benches -- -D clippy::all -D warnings -A clippy::manual_range_contains
# cargo-deny:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@master
# - run: cargo install --locked cargo-deny
# - name: Cargo deny
# run: |
# cargo-deny check --hide-inclusion-graph || true

# cargo-audit:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@master
# - run: cargo install --locked cargo-audit
# - name: Cargo audit
# run: |
# cargo audit || true

# cargo-check:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@master

# - name: Cargo build
# uses: actions-rs/cargo@master
# with:
# command: check
# args: --all-targets

# cargo-build:
# runs-on: ubuntu-latest
# # needs: cargo-check
# steps:
# - name: Checkout
# uses: actions/checkout@master

# - name: Cargo build
# uses: actions-rs/cargo@master
# with:
# command: build
# args: --tests --release

cargo-wasm-build:
cargo-test:
runs-on: ubuntu-latest
# needs: cargo-check
steps:
- name: Checkout
uses: actions/checkout@master

- name: Cargo build
uses: actions-rs/cargo@master
with:
command: build
args: --tests --release --target wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2

cargo-test:
runs-on: ubuntu-latest
# needs: cargo-check
steps:
- name: Checkout
uses: actions/checkout@master
- name: Install Protoc
uses: arduino/setup-protoc@v2

- name: Cargo test
uses: actions-rs/cargo@master
with:
command: test

# candid-check:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@master
# - name: Check interface
# run: |
# cargo run > candid/evm_rpc_expected.did
# diff candid/evm_rpc.did candid/evm_rpc_expected.did
run: unset CI && cargo test

e2e:
runs-on: ubuntu-latest
Expand All @@ -129,7 +60,7 @@ jobs:
rm install-dfx.sh
dfx cache install
echo "$HOME/bin" >> $GITHUB_PATH
- name: Start dfx
run: dfx start --background

Expand Down
Loading

0 comments on commit ad0961b

Please sign in to comment.