mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Split up tests in CI to avoid node storage limits
This commit is contained in:
66
.github/workflows/lint.yml
vendored
Normal file
66
.github/workflows/lint.yml
vendored
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
name: Lint
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- develop
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
clippy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Get nightly version to use
|
||||||
|
id: nightly
|
||||||
|
run: echo "version=$(cat .github/nightly-version)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Build Dependencies
|
||||||
|
uses: ./.github/actions/build-dependencies
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
rust-toolchain: ${{ steps.nightly.outputs.version }}
|
||||||
|
rust-components: clippy
|
||||||
|
|
||||||
|
- name: Run Clippy
|
||||||
|
run: cargo clippy --all-features --all-targets -- -D warnings -A clippy::items_after_test_module
|
||||||
|
|
||||||
|
deny:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Advisory Cache
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ~/.cargo/advisory-db
|
||||||
|
key: rust-advisory-db
|
||||||
|
|
||||||
|
- name: Install cargo
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
||||||
|
- name: Install cargo deny
|
||||||
|
run: cargo install --locked cargo-deny
|
||||||
|
|
||||||
|
- name: Run cargo deny
|
||||||
|
run: cargo deny -L error --all-features check
|
||||||
|
|
||||||
|
fmt:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Get nightly version to use
|
||||||
|
id: nightly
|
||||||
|
run: echo "version=$(cat .github/nightly-version)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Install rustfmt
|
||||||
|
uses: dtolnay/rust-toolchain@master
|
||||||
|
with:
|
||||||
|
toolchain: ${{ steps.nightly.outputs.version }}
|
||||||
|
components: rustfmt
|
||||||
|
|
||||||
|
- name: Run rustfmt
|
||||||
|
run: cargo +${{ steps.nightly.outputs.version }} fmt -- --check
|
||||||
130
.github/workflows/tests.yml
vendored
130
.github/workflows/tests.yml
vendored
@@ -8,46 +8,110 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
clippy:
|
test-common:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Get nightly version to use
|
- name: Test Dependencies
|
||||||
id: nightly
|
uses: ./.github/actions/test-dependencies
|
||||||
run: echo "version=$(cat .github/nightly-version)" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Build Dependencies
|
|
||||||
uses: ./.github/actions/build-dependencies
|
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
rust-toolchain: ${{ steps.nightly.outputs.version }}
|
|
||||||
rust-components: clippy
|
|
||||||
|
|
||||||
- name: Run Clippy
|
- name: Run Tests
|
||||||
run: cargo clippy --all-features --all-targets -- -D warnings -A clippy::items_after_test_module
|
run: |
|
||||||
|
GITHUB_CI=true cargo test --all-features \
|
||||||
|
-p std-shims \
|
||||||
|
-p zalloc \
|
||||||
|
-p serai-db
|
||||||
|
|
||||||
deny:
|
test-crypto:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Advisory Cache
|
- name: Test Dependencies
|
||||||
uses: actions/cache@v3
|
uses: ./.github/actions/test-dependencies
|
||||||
with:
|
with:
|
||||||
path: ~/.cargo/advisory-db
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
key: rust-advisory-db
|
|
||||||
|
|
||||||
- name: Install cargo
|
- name: Run Tests
|
||||||
uses: dtolnay/rust-toolchain@stable
|
run: |
|
||||||
|
GITHUB_CI=true cargo test --all-features \
|
||||||
|
-p flexible-transcript \
|
||||||
|
-p ff-group-tests \
|
||||||
|
-p dalek-ff-group \
|
||||||
|
-p ed448 \
|
||||||
|
-p ciphersuite \
|
||||||
|
-p multiexp \
|
||||||
|
-p schnorr \
|
||||||
|
-p dleq \
|
||||||
|
-p dkg \
|
||||||
|
-p frost \
|
||||||
|
-p schnorrkel
|
||||||
|
|
||||||
- name: Install cargo deny
|
test-coins:
|
||||||
run: cargo install --locked cargo-deny
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Run cargo deny
|
- name: Test Dependencies
|
||||||
run: cargo deny -L error --all-features check
|
uses: ./.github/actions/test-dependencies
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
test:
|
- name: Run Tests
|
||||||
|
run: |
|
||||||
|
GITHUB_CI=true cargo test --all-features \
|
||||||
|
-p bitcoin-serai \
|
||||||
|
-p ethereum-serai \
|
||||||
|
-p monero-generators \
|
||||||
|
-p monero-serai
|
||||||
|
|
||||||
|
test-infra:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Test Dependencies
|
||||||
|
uses: ./.github/actions/test-dependencies
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Run Tests
|
||||||
|
run: |
|
||||||
|
GITHUB_CI=true cargo test --all-features \
|
||||||
|
-p serai-message-queue \
|
||||||
|
-p serai-processor-messages \
|
||||||
|
-p serai-processor \
|
||||||
|
-p tendermint-machine \
|
||||||
|
-p tributary-chain \
|
||||||
|
-p serai-coordinator
|
||||||
|
|
||||||
|
test-substrate:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Test Dependencies
|
||||||
|
uses: ./.github/actions/test-dependencies
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Run Tests
|
||||||
|
run: |
|
||||||
|
GITHUB_CI=true cargo test --all-features \
|
||||||
|
-p serai-primitives \
|
||||||
|
-p serai-tokens-primitives \
|
||||||
|
-p serai-tokens-pallet \
|
||||||
|
-p serai-in-instructions-primitives \
|
||||||
|
-p serai-in-instructions-pallet \
|
||||||
|
-p serai-validator-sets-primitives \
|
||||||
|
-p serai-validator-sets-pallet \
|
||||||
|
-p serai-runtime \
|
||||||
|
-p serai-node
|
||||||
|
|
||||||
|
test-serai-client:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
@@ -63,22 +127,4 @@ jobs:
|
|||||||
cargo build
|
cargo build
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: GITHUB_CI=true cargo test --all-features
|
run: GITHUB_CI=true cargo test --all-features -p serai-client
|
||||||
|
|
||||||
fmt:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Get nightly version to use
|
|
||||||
id: nightly
|
|
||||||
run: echo "version=$(cat .github/nightly-version)" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Install rustfmt
|
|
||||||
uses: dtolnay/rust-toolchain@master
|
|
||||||
with:
|
|
||||||
toolchain: ${{ steps.nightly.outputs.version }}
|
|
||||||
components: rustfmt
|
|
||||||
|
|
||||||
- name: Run rustfmt
|
|
||||||
run: cargo +${{ steps.nightly.outputs.version }} fmt -- --check
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ members = [
|
|||||||
"crypto/frost",
|
"crypto/frost",
|
||||||
"crypto/schnorrkel",
|
"crypto/schnorrkel",
|
||||||
|
|
||||||
|
"coins/bitcoin",
|
||||||
"coins/ethereum",
|
"coins/ethereum",
|
||||||
"coins/monero/generators",
|
"coins/monero/generators",
|
||||||
"coins/monero",
|
"coins/monero",
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "serai-no-std"
|
name = "serai-no-std-tests"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "A crate to test no-std builds of Serai crates work"
|
description = "A crate to test no-std builds of Serai crates work"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://github.com/kayabaNerve/serai/tree/develop/common/std-shims"
|
repository = "https://github.com/kayabaNerve/serai/tree/develop/tests/no-std"
|
||||||
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
||||||
keywords = ["nostd", "no_std", "alloc", "io"]
|
keywords = ["nostd", "no_std", "alloc", "io"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|||||||
Reference in New Issue
Block a user