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
101 changes: 101 additions & 0 deletions .github/workflows/canton.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Canton Integration Tests

on:
schedule:
- cron: "0 4 * * *" # Daily at 4:00 AM UTC (after nightly at 3:00 AM)
workflow_dispatch: # Allow manual triggers
push:
branches:
- develop
paths:
- integration-tests/src/canton.rs
- integration-tests/tests/cases/canton*.rs
- integration-tests/fixtures/canton/**
- chain-signatures/canton-types/**
- chain-signatures/node/src/indexer_canton/**
pull_request:
paths:
- integration-tests/src/canton.rs
- integration-tests/tests/cases/canton*.rs
- integration-tests/fixtures/canton/**
- chain-signatures/canton-types/**
- chain-signatures/node/src/indexer_canton/**

jobs:
canton-tests:
name: Canton Stream Tests
runs-on: warp-ubuntu-latest-x64-4x

steps:
- uses: actions/checkout@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Pull Redis
run: docker pull redis:7.4.2

- name: Install Java 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'

- name: Install dpm (Canton CLI)
run: |
curl -fsSL https://get.digitalasset.com/install/install.sh | sh
echo "$HOME/.dpm/bin" >> $GITHUB_PATH
export PATH="$HOME/.dpm/bin:$PATH"
dpm --version

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- name: Install Rust (1.81.0)
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.81.0
target: wasm32-unknown-unknown

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

- uses: WarpBuilds/cache@v1
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: "${{ runner.os }}-cargo-${{ hashFiles('chain-signatures/Cargo.lock') }}"
restore-keys: ${{ runner.os }}-cargo-

- name: Build Chain-Signatures Contract
run: ./build-contract.sh

- name: Build eth contract
working-directory: ./chain-signatures/contract-eth
run: npm i && npx hardhat compile

- name: Build Chain-Signatures Node
run: cargo build -p mpc-node --release

- name: Build integration tests
run: cargo build -p integration-tests --tests

- name: Run Canton stream tests
run: cargo test -p integration-tests --test lib -- canton_stream --ignored --nocapture --test-threads 1
env:
RUST_LOG: info,workspaces=warn
RUST_BACKTRACE: 1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

tmp
*.log
*.log.*.gz

# Artifacts that may be left over
**/*-secret-manager-*
Expand Down
Loading