Skip to content

Commit e85c923

Browse files
Move KS tests (#1525)
Adds new non-publishing distr_test crate
1 parent 7fe350c commit e85c923

File tree

14 files changed

+964
-1410
lines changed

14 files changed

+964
-1410
lines changed

.github/workflows/distr_test.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: distr_test
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- ".github/workflows/distr_test.yml"
7+
- "distr_test/**"
8+
9+
jobs:
10+
distr_test:
11+
runs-on: ubuntu-latest
12+
defaults:
13+
run:
14+
working-directory: ./distr_test
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: dtolnay/rust-toolchain@master
18+
with:
19+
toolchain: nightly
20+
components: clippy, rustfmt
21+
- name: Rustfmt
22+
run: cargo fmt -- --check
23+
- name: Clippy
24+
run: cargo clippy --all-targets -- -D warnings

.github/workflows/test.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,17 @@ jobs:
111111
- name: Test rand_chacha
112112
run: cargo test --target ${{ matrix.target }} --manifest-path rand_chacha/Cargo.toml --features=serde
113113

114+
test-ks:
115+
runs-on: ubuntu-latest
116+
steps:
117+
- uses: actions/checkout@v4
118+
- name: Install toolchain
119+
uses: dtolnay/rust-toolchain@nightly
120+
with:
121+
target: x86_64-unknown-linux-gnu
122+
- name: Test Komogorov Smirnov
123+
run: cargo test --manifest-path distr_test/Cargo.toml --release
124+
114125
test-cross:
115126
runs-on: ${{ matrix.os }}
116127
strategy:

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ members = [
6666
"rand_chacha",
6767
"rand_pcg",
6868
]
69-
exclude = ["benches"]
69+
exclude = ["benches", "distr_test"]
7070

7171
[dependencies]
7272
rand_core = { path = "rand_core", version = "=0.9.0-alpha.1", default-features = false }

distr_test/Cargo.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[package]
2+
name = "distr_test"
3+
version = "0.1.0"
4+
edition = "2021"
5+
publish = false
6+
7+
[dev-dependencies]
8+
rand_distr = { path = "../rand_distr", version = "=0.5.0-alpha.1", default-features = false }
9+
rand = { path = "..", version = "=0.9.0-alpha.1", features = ["small_rng"] }
10+
num-traits = "0.2.19"
11+
# Special functions for testing distributions
12+
special = "0.11.0"
13+
spfunc = "0.1.0"
14+
# Cdf implementation
15+
statrs = "0.17.1"

0 commit comments

Comments
 (0)