Skip to content
Draft
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 .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[profile.ci-other]
default-filter = 'not package(mpc-node) and not package(mpc-contract) and not package(contract-history) and not test(=tee_authority::tests::test_upload_quote_for_collateral_with_phala_endpoint)'
default-filter = 'not package(mpc-node) and not package(mpc-contract) and not package(e2e-tests) and not package(contract-history) and not test(=tee_authority::tests::test_upload_quote_for_collateral_with_phala_endpoint)'
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,74 @@ jobs:
- name: Run cargo-make fast checks
run: cargo make check-all-fast

mpc-e2e-tests:
name: "MPC E2E tests"
needs: mpc-pytest-build
runs-on: warp-ubuntu-2404-x64-16x
timeout-minutes: 60
permissions:
contents: read
env:
MPC_PYTEST_BINARIES_CACHE_KEY: mpc-pytest-binaries-${{ github.run_id }}

steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false

- name: Restore pytest binaries cache
uses: WarpBuilds/cache/restore@8e2c4dd9bdfe2460f9f0d558ce34d030589e1556 # v1
with:
key: ${{ env.MPC_PYTEST_BINARIES_CACHE_KEY }}
fail-on-cache-miss: true
path: |
target/release/mpc-node
target/release/backup-cli
target/wasm32-unknown-unknown/release-contract/mpc_contract.wasm
target/wasm32-unknown-unknown/release-contract/test_parallel_contract.wasm
libs/nearcore/target/release/neard

- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y liblzma-dev libudev-dev

- name: Cache Rust dependencies
uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2.8.1
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
cache-provider: "warpbuild"
prefix-key: v0-rust-e2e

- name: Install cargo-binstall
uses: taiki-e/install-action@d4422f254e595ee762a758628fe4f16ce050fa2e # v2.67.28
with:
tool: cargo-binstall

- name: Install cargo-near
run: |
cargo binstall --force --no-confirm --locked cargo-near@0.19.1 --pkg-url="{ repo }/releases/download/{ name }-v{ version }/{ name }-{ target }.{ archive-format }"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install wasm-opt
run: |
cargo binstall --force --no-confirm --locked wasm-opt@0.116.1
echo "${HOME}/.cargo/bin" >> $GITHUB_PATH
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build contract with cargo-near
run: |
cargo near build non-reproducible-wasm \
--manifest-path crates/contract/Cargo.toml \
--out-dir target/near/mpc_contract

- name: Run E2E tests
run: |
RUST_LOG=info,e2e_tests=debug cargo test -p e2e-tests --all-features --locked 2>&1

ci-extra:
name: "Extra CI checks"
runs-on: warp-ubuntu-2404-x64-2x
Expand Down
77 changes: 77 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ average = "0.16"
axum = "0.8.8"
backon = { version = "1.6.0", features = ["tokio-sleep"] }
base64 = "0.22.1"
bollard = "0.18"
blstrs = "0.7.1"
borsh = { version = "1.6.0", features = ["derive"] }
bs58 = { version = "0.5.1" }
Expand Down Expand Up @@ -190,6 +191,7 @@ signature = "2.2.0"
socket2 = "0.6.3"
subtle = "2.6.1"
syn = "2.0"
tar = "0.4"
tempfile = "3.27.0"
test-log = "0.2.19"
thiserror = "2.0.18"
Expand Down
5 changes: 5 additions & 0 deletions crates/e2e-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ license = { workspace = true }

[dependencies]
anyhow = { workspace = true }
bollard = { workspace = true }
bs58 = { workspace = true }
ed25519-dalek = { workspace = true }
futures = { workspace = true }
Expand All @@ -17,10 +18,14 @@ rand = { workspace = true }
reqwest = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
tar = { workspace = true }
tempfile = { workspace = true }
tokio = { workspace = true }
toml = { workspace = true }
tracing = { workspace = true }

[dev-dependencies]
tracing-subscriber = { workspace = true }

[lints]
workspace = true
Loading
Loading