mirror of
https://github.com/serai-dex/serai.git
synced 2024-11-16 17:07:35 +00:00
Split up tests in CI to avoid node storage limits
This commit is contained in:
parent
62504b2622
commit
f0ce6e6388
4 changed files with 157 additions and 44 deletions
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:
|
||||
|
||||
jobs:
|
||||
clippy:
|
||||
test-common:
|
||||
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
|
||||
- name: Test Dependencies
|
||||
uses: ./.github/actions/test-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
|
||||
- name: Run Tests
|
||||
run: |
|
||||
GITHUB_CI=true cargo test --all-features \
|
||||
-p std-shims \
|
||||
-p zalloc \
|
||||
-p serai-db
|
||||
|
||||
deny:
|
||||
test-crypto:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Advisory Cache
|
||||
uses: actions/cache@v3
|
||||
- name: Test Dependencies
|
||||
uses: ./.github/actions/test-dependencies
|
||||
with:
|
||||
path: ~/.cargo/advisory-db
|
||||
key: rust-advisory-db
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Install cargo
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Run Tests
|
||||
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
|
||||
run: cargo install --locked cargo-deny
|
||||
test-coins:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Run cargo deny
|
||||
run: cargo deny -L error --all-features check
|
||||
- name: Test Dependencies
|
||||
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
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
@ -63,22 +127,4 @@ jobs:
|
|||
cargo build
|
||||
|
||||
- name: Run Tests
|
||||
run: GITHUB_CI=true cargo test --all-features
|
||||
|
||||
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
|
||||
run: GITHUB_CI=true cargo test --all-features -p serai-client
|
||||
|
|
|
@ -19,6 +19,7 @@ members = [
|
|||
"crypto/frost",
|
||||
"crypto/schnorrkel",
|
||||
|
||||
"coins/bitcoin",
|
||||
"coins/ethereum",
|
||||
"coins/monero/generators",
|
||||
"coins/monero",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
[package]
|
||||
name = "serai-no-std"
|
||||
name = "serai-no-std-tests"
|
||||
version = "0.1.0"
|
||||
description = "A crate to test no-std builds of Serai crates work"
|
||||
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>"]
|
||||
keywords = ["nostd", "no_std", "alloc", "io"]
|
||||
edition = "2021"
|
||||
|
|
Loading…
Reference in a new issue