Skip to content

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vemonet committed Dec 21, 2023
1 parent 61da9f9 commit 4203259
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,18 @@ jobs:
clippy:
name: 📎 fmt and clippy
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v4
- run: rustup update && rustup component add clippy rustfmt
- run: |
rustup update
rustup toolchain install nightly
rustup default nightly
rustup component add clippy rustfmt
- run: cargo fmt -- --check
- run: cargo clippy --all --all-targets --all-features
- run: cargo bench

test:
name: 🧪 Tests
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ repos:
entry: cargo fmt
language: system
pass_filenames: false
- id: git-cliff
name: 🏔️ Update changelog
entry: git cliff -o CHANGELOG.md
language: system
pass_filenames: false
# - id: git-cliff
# name: 🏔️ Update changelog
# entry: git cliff -o CHANGELOG.md
# language: system
# pass_filenames: false
ci:
autofix_commit_msg: 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
autoupdate_commit_msg: ⬆ [pre-commit.ci] pre-commit autoupdate
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ All notable changes to this project will be documented in this file.

- Add functions to find_prefixes, find_postfixes, and find_longest_prefix. Rename files - ([ccbae67](https://github.com/vemonet/ptrie/commit/ccbae673304c0d052e8625f2040b2a2005afc408))

### 📚 Documentation

- Update readme, add contributing.md, add git cliff to generate changelog, add pre-commit to automatically fmt and update changelog - ([61da9f9](https://github.com/vemonet/ptrie/commit/61da9f9456793d786ca3bb04719b27aa34f95759))

### 🧪 Testing

- Improve tests, add GitHub actions workflows for testing and releasing, remove travis CI, update benchmark script - ([8391056](https://github.com/vemonet/ptrie/commit/839105644ff00e1ac9a8fee08bf0c5f6eb2fddf8))
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The trie is particularly effective for operations involving common prefix ident

### ✨ Find prefixes

PTrie can return all prefixes in the trie corresponding to a given string, sorted in ascending order of their length.
You can return all prefixes in the trie corresponding to a given string, sorted in ascending order of their length.

```rust
use ptrie::Trie;
Expand All @@ -53,7 +53,7 @@ assert_eq!(prefixes, vec!["A", "AB", "ABC"]);

### 🔍 Find postfixes

PTrie can also find all strings in the trie that begin with a specified prefix.
You can also find all strings in the trie that begin with a specified prefix.

```rust
use ptrie::Trie;
Expand All @@ -71,7 +71,7 @@ assert_eq!(strings, vec!["App", "Apple", "Applet"]);

### 🔑 Key-based Retrieval Functions

PTrie provides functions to check for the existence of a key and to retrieve the associated value.
The crate provides functions to check for the existence of a key and to retrieve the associated value.

```rust
use ptrie::Trie;
Expand Down

0 comments on commit 4203259

Please sign in to comment.