-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
152 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Continuous integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
REDIS_RS_REDIS_JSON_PATH: "/tmp/librejson.so" | ||
|
||
jobs: | ||
check: | ||
name: Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- run: cargo check --all-features | ||
|
||
test: | ||
name: Test Suite | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
redis: | ||
- 6.2.6-v6 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v1 | ||
- name: Cache redis | ||
id: cache-redis | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
/usr/bin/redis-cli | ||
/usr/bin/redis-server | ||
key: ${{ runner.os }}-redis | ||
- name: Cache RedisJSON | ||
id: cache-redisjson | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
/tmp/librejson.so | ||
key: ${{ runner.os }}-redisjson | ||
- name: Start Redis | ||
uses: supercharge/[email protected] | ||
with: | ||
redis-image: redis/redis-stack | ||
redis-version: ${{ matrix.redis }} | ||
- run: cargo test | ||
- run: cargo test --manifest-path lib/Cargo.toml | ||
- run: cargo test --manifest-path lib/Cargo.toml --features json | ||
- run: cargo test --manifest-path lib/Cargo.toml --features json,tokio-comp | ||
- run: cargo test --all-features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,40 @@ | ||
[package] | ||
name = "redis-om" | ||
description = "The Unofficial Object mapping for Redis and Rust. Inspired by redis-om-python" | ||
description = "Redis ORM-style library that simplify the development process and reduce the amount of boilerplate code needed to build programs that leverage [redis] powerful capabilities and use cases." | ||
version = "0.1.0" | ||
edition = "2021" | ||
authors = [ "kkharji <[email protected]>"] | ||
license = "MIT" | ||
documentation = "https://docs.rs/redis-om" | ||
homepage = "https://github.com/kkharji/redis-om-rust" | ||
repository = "https://github.com/kkharji/redis-om-rust" | ||
homepage = "https://github.com/kkharji/redis-om" | ||
repository = "https://github.com/kkharji/redis-om" | ||
|
||
[package.metadata.docs.rs] | ||
all-features = true | ||
rustdoc-args = ["--cfg", "docsrs"] | ||
|
||
[features] | ||
default = [] | ||
default = [ "tokio-comp" ] | ||
### Enables json model support | ||
json = [ "redis/json", "serde", "serde_json", "redis-om-macros/json" ] | ||
##! ### Internal features | ||
### Enables aio (used in tokio-native-tls-comp, tokio-comp) | ||
aio = [ "redis/aio", "async-trait", "redis-om-macros/aio", "futures" ] | ||
### Enables async-tokio support | ||
tokio-comp = ["aio", "redis/tokio-comp"] | ||
### Enables async-std support | ||
async-std-comp = ["aio", "redis/async-std-comp"] | ||
### Enables tls support | ||
tls = ["redis/tls"] | ||
### Enables async-tokio with tls support | ||
tokio-native-tls-comp = [ "redis/tokio-native-tls-comp" ] | ||
### Enables async-std with tls support | ||
async-std-tls-comp = [ "redis/async-std-tls-comp" ] | ||
|
||
[dependencies] | ||
tap = { version = "1.0" } | ||
thiserror = { version = "1.0" } | ||
redis-om-macros = { path = "../macros" } | ||
redis-om-macros = { version = "0.1.0", path = "../macros" } | ||
redis = { version = "0.22.1" } | ||
rusty_ulid = { version = "2.0.0" } | ||
serde = { version = "1", features = [ "derive" ], optional = true } | ||
|
@@ -38,6 +46,3 @@ futures = { version = "0.3.26", optional = true } | |
tokio = { version = "1.25.0", features = ["full"] } | ||
trybuild = { version = "1.0.77" } | ||
redis-swapplex = { version = "0.4.0" } | ||
|
||
[[example]] | ||
name = "readme" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.