serai/.github/workflows/tests.yml

109 lines
3.3 KiB
YAML
Raw Normal View History

set up CI (#45) * begin to setup ci * attempt to fix build * fix paths in build script * fix * satisfy clippy * update fmt check to use nightly * use nightly for build * fmt * fix fmt install * update test script * try to fix fmt * merge w develop * maybe fix build script * install wasm toolchain * install solc-select, use stable rust to build * Correct clippy warnings Currently intended to be done with: cargo clippy --features "recommended merlin batch serialize experimental ed25519 ristretto p256 secp256k1 multisig" -- -A clippy::type_complexity -A dead_code * Remove try-runtime I tried to get this to work for an hour. I have no idea why it doesn't, yet it doesn't. * Rewrite workflow Splits tasks into a more modular structure. Also uses actions-rs/toolchain. * Add a cache * Immediately try building ETH/Monero while this is fixed Adds solc-select use. * Revert selective advance building of ETH/XMR ETH builds now, so it hopefully should work now. Also moves from on push to on push to develop. * Install Monero runtime dependencies Specify missing Rust toolchain setting. * Correct multi-line commands * Fix multi-line commands again Cache Ethereum artifacts. * Add Foundry * Move Clippy under build * Minimal rustup Adds wasm Clippy. Puts Clippy before build. * Use nightly clippy * Remove old clippy call from under build * Have the Monero build script support ARCH specification Requirement for CI. * Add WASM toolchain to tests * Remove Ethereum cache which did not work as needed * Remove extraneous quotes which broke builds on Arch Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
2022-07-22 16:31:29 +00:00
name: Tests
on:
push:
branches:
- develop
paths:
- "common/**"
- "crypto/**"
- "networks/**"
- "message-queue/**"
- "processor/**"
- "coordinator/**"
- "substrate/**"
2023-07-20 23:34:10 +00:00
set up CI (#45) * begin to setup ci * attempt to fix build * fix paths in build script * fix * satisfy clippy * update fmt check to use nightly * use nightly for build * fmt * fix fmt install * update test script * try to fix fmt * merge w develop * maybe fix build script * install wasm toolchain * install solc-select, use stable rust to build * Correct clippy warnings Currently intended to be done with: cargo clippy --features "recommended merlin batch serialize experimental ed25519 ristretto p256 secp256k1 multisig" -- -A clippy::type_complexity -A dead_code * Remove try-runtime I tried to get this to work for an hour. I have no idea why it doesn't, yet it doesn't. * Rewrite workflow Splits tasks into a more modular structure. Also uses actions-rs/toolchain. * Add a cache * Immediately try building ETH/Monero while this is fixed Adds solc-select use. * Revert selective advance building of ETH/XMR ETH builds now, so it hopefully should work now. Also moves from on push to on push to develop. * Install Monero runtime dependencies Specify missing Rust toolchain setting. * Correct multi-line commands * Fix multi-line commands again Cache Ethereum artifacts. * Add Foundry * Move Clippy under build * Minimal rustup Adds wasm Clippy. Puts Clippy before build. * Use nightly clippy * Remove old clippy call from under build * Have the Monero build script support ARCH specification Requirement for CI. * Add WASM toolchain to tests * Remove Ethereum cache which did not work as needed * Remove extraneous quotes which broke builds on Arch Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
2022-07-22 16:31:29 +00:00
pull_request:
2023-07-20 23:34:10 +00:00
paths:
- "common/**"
- "crypto/**"
- "networks/**"
2023-07-20 23:34:10 +00:00
- "message-queue/**"
- "processor/**"
- "coordinator/**"
- "substrate/**"
workflow_dispatch:
set up CI (#45) * begin to setup ci * attempt to fix build * fix paths in build script * fix * satisfy clippy * update fmt check to use nightly * use nightly for build * fmt * fix fmt install * update test script * try to fix fmt * merge w develop * maybe fix build script * install wasm toolchain * install solc-select, use stable rust to build * Correct clippy warnings Currently intended to be done with: cargo clippy --features "recommended merlin batch serialize experimental ed25519 ristretto p256 secp256k1 multisig" -- -A clippy::type_complexity -A dead_code * Remove try-runtime I tried to get this to work for an hour. I have no idea why it doesn't, yet it doesn't. * Rewrite workflow Splits tasks into a more modular structure. Also uses actions-rs/toolchain. * Add a cache * Immediately try building ETH/Monero while this is fixed Adds solc-select use. * Revert selective advance building of ETH/XMR ETH builds now, so it hopefully should work now. Also moves from on push to on push to develop. * Install Monero runtime dependencies Specify missing Rust toolchain setting. * Correct multi-line commands * Fix multi-line commands again Cache Ethereum artifacts. * Add Foundry * Move Clippy under build * Minimal rustup Adds wasm Clippy. Puts Clippy before build. * Use nightly clippy * Remove old clippy call from under build * Have the Monero build script support ARCH specification Requirement for CI. * Add WASM toolchain to tests * Remove Ethereum cache which did not work as needed * Remove extraneous quotes which broke builds on Arch Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
2022-07-22 16:31:29 +00:00
jobs:
test-infra:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
set up CI (#45) * begin to setup ci * attempt to fix build * fix paths in build script * fix * satisfy clippy * update fmt check to use nightly * use nightly for build * fmt * fix fmt install * update test script * try to fix fmt * merge w develop * maybe fix build script * install wasm toolchain * install solc-select, use stable rust to build * Correct clippy warnings Currently intended to be done with: cargo clippy --features "recommended merlin batch serialize experimental ed25519 ristretto p256 secp256k1 multisig" -- -A clippy::type_complexity -A dead_code * Remove try-runtime I tried to get this to work for an hour. I have no idea why it doesn't, yet it doesn't. * Rewrite workflow Splits tasks into a more modular structure. Also uses actions-rs/toolchain. * Add a cache * Immediately try building ETH/Monero while this is fixed Adds solc-select use. * Revert selective advance building of ETH/XMR ETH builds now, so it hopefully should work now. Also moves from on push to on push to develop. * Install Monero runtime dependencies Specify missing Rust toolchain setting. * Correct multi-line commands * Fix multi-line commands again Cache Ethereum artifacts. * Add Foundry * Move Clippy under build * Minimal rustup Adds wasm Clippy. Puts Clippy before build. * Use nightly clippy * Remove old clippy call from under build * Have the Monero build script support ARCH specification Requirement for CI. * Add WASM toolchain to tests * Remove Ethereum cache which did not work as needed * Remove extraneous quotes which broke builds on Arch Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
2022-07-22 16:31:29 +00:00
2023-10-23 11:25:00 +00:00
- name: Build Dependencies
uses: ./.github/actions/build-dependencies
set up CI (#45) * begin to setup ci * attempt to fix build * fix paths in build script * fix * satisfy clippy * update fmt check to use nightly * use nightly for build * fmt * fix fmt install * update test script * try to fix fmt * merge w develop * maybe fix build script * install wasm toolchain * install solc-select, use stable rust to build * Correct clippy warnings Currently intended to be done with: cargo clippy --features "recommended merlin batch serialize experimental ed25519 ristretto p256 secp256k1 multisig" -- -A clippy::type_complexity -A dead_code * Remove try-runtime I tried to get this to work for an hour. I have no idea why it doesn't, yet it doesn't. * Rewrite workflow Splits tasks into a more modular structure. Also uses actions-rs/toolchain. * Add a cache * Immediately try building ETH/Monero while this is fixed Adds solc-select use. * Revert selective advance building of ETH/XMR ETH builds now, so it hopefully should work now. Also moves from on push to on push to develop. * Install Monero runtime dependencies Specify missing Rust toolchain setting. * Correct multi-line commands * Fix multi-line commands again Cache Ethereum artifacts. * Add Foundry * Move Clippy under build * Minimal rustup Adds wasm Clippy. Puts Clippy before build. * Use nightly clippy * Remove old clippy call from under build * Have the Monero build script support ARCH specification Requirement for CI. * Add WASM toolchain to tests * Remove Ethereum cache which did not work as needed * Remove extraneous quotes which broke builds on Arch Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
2022-07-22 16:31:29 +00:00
- name: Run Tests
Initial In Instructions pallet and Serai client lib (#233) * Initial work on an In Inherents pallet * Add an event for when a batch is executed * Add a dummy provider for InInstructions * Add in-instructions to the node * Add the Serai runtime API to the processor * Move processor tests around * Build a subxt Client around Serai * Successfully get Batch events from Serai Renamed processor/substrate to processor/serai. * Much more robust InInstruction pallet * Implement the workaround from https://github.com/paritytech/subxt/issues/602 * Initial prototype of processor generated InInstructions * Correct PendingCoins data flow for InInstructions * Minor lint to in-instructions * Remove the global Serai connection for a partial re-impl * Correct ID handling of the processor test * Workaround the delay in the subscription * Make an unwrap an if let Some, remove old comments * Lint the processor toml * Rebase and update * Move substrate/in-instructions to substrate/in-instructions/pallet * Start an in-instructions primitives lib * Properly update processor to subxt 0.24 Also corrects failures from the rebase. * in-instructions cargo update * Implement IsFatalError * is_inherent -> true * Rename in-instructions crates and misc cleanup * Update documentation * cargo update * Misc update fixes * Replace height with block_number * Update processor src to latest subxt * Correct pipeline for InInstructions testing * Remove runtime::AccountId for serai_primitives::NativeAddress * Rewrite the in-instructions pallet Complete with respect to the currently written docs. Drops the custom serializer for just using SCALE. Makes slight tweaks as relevant. * Move instructions' InherentDataProvider to a client crate * Correct doc gen * Add serde to in-instructions-primitives * Add in-instructions-primitives to pallet * Heights -> BlockNumbers * Get batch pub test loop working * Update in instructions pallet terminology Removes the ambiguous Coin for Update. Removes pending/artificial latency for furture client work. Also moves to using serai_primitives::Coin. * Add a BlockNumber primitive * Belated cargo fmt * Further document why DifferentBatch isn't fatal * Correct processor sleeps * Remove metadata at compile time, add test framework for Serai nodes * Remove manual RPC client * Simplify update test * Improve re-exporting behavior of serai-runtime It now re-exports all pallets underneath it. * Add a function to get storage values to the Serai RPC * Update substrate/ to latest substrate * Create a dedicated crate for the Serai RPC * Remove unused dependencies in substrate/ * Remove unused dependencies in coins/ Out of scope for this branch, just minor and path of least resistance. * Use substrate/serai/client for the Serai RPC lib It's a bit out of place, since these client folders are intended for the node to access pallets and so on. This is for end-users to access Serai as a whole. In that sense, it made more sense as a top level folder, yet that also felt out of place. * Move InInstructions test to serai-client for now * Final cleanup * Update deny.toml * Cargo.lock update from merging develop * Update nightly Attempt to work around the current CI failure, which is a Rust ICE. We previously didn't upgrade due to clippy 10134, yet that's been reverted. * clippy * clippy * fmt * NativeAddress -> SeraiAddress * Sec fix on non-provided updates and doc fixes * Add Serai as a Coin Necessary in order to swap to Serai. * Add a BlockHash type, used for batch IDs * Remove origin from InInstruction Makes InInstructionTarget. Adds RefundableInInstruction with origin. * Document storage items in in-instructions * Rename serai/client/tests/serai.rs to updates.rs It only tested publishing updates and their successful acceptance.
2023-01-20 16:00:18 +00:00
run: |
GITHUB_CI=true RUST_BACKTRACE=1 cargo test --all-features \
-p serai-message-queue \
-p serai-processor-messages \
2024-08-16 18:51:31 +00:00
-p serai-processor-key-gen \
-p serai-processor-view-keys \
-p serai-processor-frost-attempt-manager \
-p serai-processor-primitives \
-p serai-processor-scanner \
-p serai-processor-scheduler-primitives \
-p serai-processor-utxo-scheduler-primitives \
2024-09-04 07:54:12 +00:00
-p serai-processor-utxo-scheduler \
-p serai-processor-transaction-chaining-scheduler \
2024-09-14 09:20:02 +00:00
-p serai-processor-smart-contract-scheduler \
-p serai-processor-signers \
-p serai-processor-bin \
-p serai-bitcoin-processor \
2024-09-15 02:12:32 +00:00
-p serai-processor-ethereum-contracts \
2024-09-15 21:13:10 +00:00
-p serai-processor-ethereum-primitives \
-p serai-processor-ethereum-deployer \
2024-09-17 05:04:08 +00:00
-p serai-processor-ethereum-router \
2024-09-17 01:59:12 +00:00
-p serai-processor-ethereum-erc20 \
2024-09-15 21:13:10 +00:00
-p ethereum-serai \
-p serai-ethereum-processor \
-p serai-monero-processor \
-p tendermint-machine \
-p tributary-chain \
-p serai-coordinator \
2024-04-19 10:12:33 +00:00
-p serai-orchestrator \
-p serai-docker-tests
test-substrate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
Initial In Instructions pallet and Serai client lib (#233) * Initial work on an In Inherents pallet * Add an event for when a batch is executed * Add a dummy provider for InInstructions * Add in-instructions to the node * Add the Serai runtime API to the processor * Move processor tests around * Build a subxt Client around Serai * Successfully get Batch events from Serai Renamed processor/substrate to processor/serai. * Much more robust InInstruction pallet * Implement the workaround from https://github.com/paritytech/subxt/issues/602 * Initial prototype of processor generated InInstructions * Correct PendingCoins data flow for InInstructions * Minor lint to in-instructions * Remove the global Serai connection for a partial re-impl * Correct ID handling of the processor test * Workaround the delay in the subscription * Make an unwrap an if let Some, remove old comments * Lint the processor toml * Rebase and update * Move substrate/in-instructions to substrate/in-instructions/pallet * Start an in-instructions primitives lib * Properly update processor to subxt 0.24 Also corrects failures from the rebase. * in-instructions cargo update * Implement IsFatalError * is_inherent -> true * Rename in-instructions crates and misc cleanup * Update documentation * cargo update * Misc update fixes * Replace height with block_number * Update processor src to latest subxt * Correct pipeline for InInstructions testing * Remove runtime::AccountId for serai_primitives::NativeAddress * Rewrite the in-instructions pallet Complete with respect to the currently written docs. Drops the custom serializer for just using SCALE. Makes slight tweaks as relevant. * Move instructions' InherentDataProvider to a client crate * Correct doc gen * Add serde to in-instructions-primitives * Add in-instructions-primitives to pallet * Heights -> BlockNumbers * Get batch pub test loop working * Update in instructions pallet terminology Removes the ambiguous Coin for Update. Removes pending/artificial latency for furture client work. Also moves to using serai_primitives::Coin. * Add a BlockNumber primitive * Belated cargo fmt * Further document why DifferentBatch isn't fatal * Correct processor sleeps * Remove metadata at compile time, add test framework for Serai nodes * Remove manual RPC client * Simplify update test * Improve re-exporting behavior of serai-runtime It now re-exports all pallets underneath it. * Add a function to get storage values to the Serai RPC * Update substrate/ to latest substrate * Create a dedicated crate for the Serai RPC * Remove unused dependencies in substrate/ * Remove unused dependencies in coins/ Out of scope for this branch, just minor and path of least resistance. * Use substrate/serai/client for the Serai RPC lib It's a bit out of place, since these client folders are intended for the node to access pallets and so on. This is for end-users to access Serai as a whole. In that sense, it made more sense as a top level folder, yet that also felt out of place. * Move InInstructions test to serai-client for now * Final cleanup * Update deny.toml * Cargo.lock update from merging develop * Update nightly Attempt to work around the current CI failure, which is a Rust ICE. We previously didn't upgrade due to clippy 10134, yet that's been reverted. * clippy * clippy * fmt * NativeAddress -> SeraiAddress * Sec fix on non-provided updates and doc fixes * Add Serai as a Coin Necessary in order to swap to Serai. * Add a BlockHash type, used for batch IDs * Remove origin from InInstruction Makes InInstructionTarget. Adds RefundableInInstruction with origin. * Document storage items in in-instructions * Rename serai/client/tests/serai.rs to updates.rs It only tested publishing updates and their successful acceptance.
2023-01-20 16:00:18 +00:00
2023-10-23 11:25:00 +00:00
- name: Build Dependencies
uses: ./.github/actions/build-dependencies
set up CI (#45) * begin to setup ci * attempt to fix build * fix paths in build script * fix * satisfy clippy * update fmt check to use nightly * use nightly for build * fmt * fix fmt install * update test script * try to fix fmt * merge w develop * maybe fix build script * install wasm toolchain * install solc-select, use stable rust to build * Correct clippy warnings Currently intended to be done with: cargo clippy --features "recommended merlin batch serialize experimental ed25519 ristretto p256 secp256k1 multisig" -- -A clippy::type_complexity -A dead_code * Remove try-runtime I tried to get this to work for an hour. I have no idea why it doesn't, yet it doesn't. * Rewrite workflow Splits tasks into a more modular structure. Also uses actions-rs/toolchain. * Add a cache * Immediately try building ETH/Monero while this is fixed Adds solc-select use. * Revert selective advance building of ETH/XMR ETH builds now, so it hopefully should work now. Also moves from on push to on push to develop. * Install Monero runtime dependencies Specify missing Rust toolchain setting. * Correct multi-line commands * Fix multi-line commands again Cache Ethereum artifacts. * Add Foundry * Move Clippy under build * Minimal rustup Adds wasm Clippy. Puts Clippy before build. * Use nightly clippy * Remove old clippy call from under build * Have the Monero build script support ARCH specification Requirement for CI. * Add WASM toolchain to tests * Remove Ethereum cache which did not work as needed * Remove extraneous quotes which broke builds on Arch Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
2022-07-22 16:31:29 +00:00
- name: Run Tests
run: |
GITHUB_CI=true RUST_BACKTRACE=1 cargo test --all-features \
-p serai-primitives \
-p serai-coins-primitives \
-p serai-coins-pallet \
-p serai-dex-pallet \
-p serai-validator-sets-primitives \
-p serai-validator-sets-pallet \
-p serai-genesis-liquidity-primitives \
-p serai-genesis-liquidity-pallet \
-p serai-emissions-primitives \
-p serai-emissions-pallet \
-p serai-economic-security-pallet \
-p serai-in-instructions-primitives \
-p serai-in-instructions-pallet \
2024-04-19 10:12:33 +00:00
-p serai-signals-primitives \
-p serai-signals-pallet \
2024-04-19 10:12:33 +00:00
-p serai-abi \
-p serai-runtime \
-p serai-node
test-serai-client:
set up CI (#45) * begin to setup ci * attempt to fix build * fix paths in build script * fix * satisfy clippy * update fmt check to use nightly * use nightly for build * fmt * fix fmt install * update test script * try to fix fmt * merge w develop * maybe fix build script * install wasm toolchain * install solc-select, use stable rust to build * Correct clippy warnings Currently intended to be done with: cargo clippy --features "recommended merlin batch serialize experimental ed25519 ristretto p256 secp256k1 multisig" -- -A clippy::type_complexity -A dead_code * Remove try-runtime I tried to get this to work for an hour. I have no idea why it doesn't, yet it doesn't. * Rewrite workflow Splits tasks into a more modular structure. Also uses actions-rs/toolchain. * Add a cache * Immediately try building ETH/Monero while this is fixed Adds solc-select use. * Revert selective advance building of ETH/XMR ETH builds now, so it hopefully should work now. Also moves from on push to on push to develop. * Install Monero runtime dependencies Specify missing Rust toolchain setting. * Correct multi-line commands * Fix multi-line commands again Cache Ethereum artifacts. * Add Foundry * Move Clippy under build * Minimal rustup Adds wasm Clippy. Puts Clippy before build. * Use nightly clippy * Remove old clippy call from under build * Have the Monero build script support ARCH specification Requirement for CI. * Add WASM toolchain to tests * Remove Ethereum cache which did not work as needed * Remove extraneous quotes which broke builds on Arch Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
2022-07-22 16:31:29 +00:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
set up CI (#45) * begin to setup ci * attempt to fix build * fix paths in build script * fix * satisfy clippy * update fmt check to use nightly * use nightly for build * fmt * fix fmt install * update test script * try to fix fmt * merge w develop * maybe fix build script * install wasm toolchain * install solc-select, use stable rust to build * Correct clippy warnings Currently intended to be done with: cargo clippy --features "recommended merlin batch serialize experimental ed25519 ristretto p256 secp256k1 multisig" -- -A clippy::type_complexity -A dead_code * Remove try-runtime I tried to get this to work for an hour. I have no idea why it doesn't, yet it doesn't. * Rewrite workflow Splits tasks into a more modular structure. Also uses actions-rs/toolchain. * Add a cache * Immediately try building ETH/Monero while this is fixed Adds solc-select use. * Revert selective advance building of ETH/XMR ETH builds now, so it hopefully should work now. Also moves from on push to on push to develop. * Install Monero runtime dependencies Specify missing Rust toolchain setting. * Correct multi-line commands * Fix multi-line commands again Cache Ethereum artifacts. * Add Foundry * Move Clippy under build * Minimal rustup Adds wasm Clippy. Puts Clippy before build. * Use nightly clippy * Remove old clippy call from under build * Have the Monero build script support ARCH specification Requirement for CI. * Add WASM toolchain to tests * Remove Ethereum cache which did not work as needed * Remove extraneous quotes which broke builds on Arch Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
2022-07-22 16:31:29 +00:00
- name: Build Dependencies
uses: ./.github/actions/build-dependencies
- name: Run Tests
run: GITHUB_CI=true RUST_BACKTRACE=1 cargo test --all-features -p serai-client