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
89 changes: 45 additions & 44 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,46 +9,47 @@ on:
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Dwarnings"
RUST_BACKTRACE: 1

jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust stable with clippy
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
# clippy:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Install Rust stable with clippy
# uses: dtolnay/rust-toolchain@stable
# with:
# components: clippy

- name: Run cargo clippy (default features)
run: cargo clippy --all-targets
# - name: Run cargo clippy (default features)
# run: cargo clippy --all-targets

fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust stable with rustfmt
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
# fmt:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Install Rust stable with rustfmt
# uses: dtolnay/rust-toolchain@stable
# with:
# components: rustfmt

- name: Run rustfmt --check
run: cargo fmt -- --check
# - name: Run rustfmt --check
# run: cargo fmt -- --check

msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- uses: Swatinem/rust-cache@v2
- name: Use predefined lockfile
run: mv -v Cargo.lock.MSRV Cargo.lock
- name: Build (lib only)
run: cargo hack check --rust-version --locked
# msrv:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Install cargo-hack
# uses: taiki-e/install-action@cargo-hack
# - uses: Swatinem/rust-cache@v2
# - name: Use predefined lockfile
# run: mv -v Cargo.lock.MSRV Cargo.lock
# - name: Build (lib only)
# run: cargo hack check --rust-version --locked

test:
needs: [clippy, fmt, msrv]
# needs: [clippy, fmt, msrv]
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -65,15 +66,15 @@ jobs:
- name: Test default features
run: cargo test

features:
needs: [clippy, fmt]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- uses: Swatinem/rust-cache@v2
- name: Check all possible feature sets
run: cargo hack check --feature-powerset --no-dev-deps
# features:
# needs: [clippy, fmt]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Install Rust stable
# uses: dtolnay/rust-toolchain@stable
# - name: Install cargo-hack
# uses: taiki-e/install-action@cargo-hack
# - uses: Swatinem/rust-cache@v2
# - name: Check all possible feature sets
# run: cargo hack check --feature-powerset --no-dev-deps
1 change: 1 addition & 0 deletions src/distribution/geometric.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ mod tests {
let cdf = |arg: u64| move |x: Geometric| x.cdf(arg);
test_exact(1.0, 1.0, cdf(1));
test_exact(1.0, 1.0, cdf(2));
test_exact(0.2, 0.2, cdf(1));
test_absolute(0.5, 0.5, 1e-15, cdf(1));
test_absolute(0.5, 0.75, 1e-15, cdf(2));
}
Expand Down
Loading