Skip to content
Merged
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
5 changes: 4 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ env:

jobs:
benchmark:
defaults:
run:
working-directory: ./async-nats
runs-on: ubuntu-latest
steps:
- name: Check out repository
Expand All @@ -36,7 +39,7 @@ jobs:
with:
shared-key: ${{ runner.os }}-${{ steps.install-rust.outputs.cachekey }}-${{ hashFiles('**/Cargo.toml') }}
- name: Build the package # for caching
run: cargo build --all --all-targets
run: cargo build --all-targets

- name: Run benchmarks
env:
Expand Down
26 changes: 24 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ defaults:

jobs:
test_matrix:
defaults:
run:
working-directory: ./async-nats
name: test (${{ matrix.os }} / stable)
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -55,7 +58,8 @@ jobs:
cache-on-failure: true
- name: Build all packages
id: build-packages
run: cargo build --all --all-targets
run: |
cargo build --all-targets

- name: Setup deno for service tests
if: ${{ matrix.os }} != windows-latest
Expand Down Expand Up @@ -91,6 +95,9 @@ jobs:
run: cargo fmt -- --check

check_lint:
defaults:
run:
working-directory: ./async-nats
name: check linter (ubuntu-latest / stable)
runs-on: ubuntu-latest
steps:
Expand All @@ -109,9 +116,12 @@ jobs:
save-if: false # the linter only run checks but not builds, so we don't have the full build to be cached.

- name: Run linter
run: cargo clippy --benches --tests --examples --all-features --workspace --exclude nats -- --deny clippy::all
run: cargo clippy --benches --tests --examples --all-features -- --deny clippy::all

check_docs:
defaults:
run:
working-directory: ./async-nats
name: check docs (ubuntu-latest / stable)
runs-on: ubuntu-latest
steps:
Expand All @@ -131,6 +141,9 @@ jobs:
run: cargo doc --no-deps --all-features

check_features:
defaults:
run:
working-directory: ./async-nats
name: check feature flags (ubuntu-latest / stable)
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -163,6 +176,9 @@ jobs:
command-arguments: licenses

check_msrv:
defaults:
run:
working-directory: ./async-nats
name: check minimal supported rust version (ubuntu-latest / msrv)
runs-on: ubuntu-latest
steps:
Expand All @@ -185,6 +201,9 @@ jobs:
cargo +${{ steps.install-rust.outputs.name }} check

check_examples:
defaults:
run:
working-directory: ./async-nats
name: check examples (ubuntu-latest / stable)
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -231,6 +250,9 @@ jobs:
run: cargo spellcheck --code 1

check_min_versions:
defaults:
run:
working-directory: ./async-nats
name: check minimal versions of transitive dependencies (ubuntu-latest / stable)
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion async-nats/src/jetstream/consumer/push.rs
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ impl IntoConsumerConfig for OrderedConfig {
}

impl Consumer<OrderedConfig> {
pub async fn messages<'a>(self) -> Result<Ordered, StreamError> {
pub async fn messages(self) -> Result<Ordered, StreamError> {
let subscriber = self
.context
.client
Expand Down
2 changes: 1 addition & 1 deletion async-nats/src/jetstream/object_store/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ impl ObjectStore {
/// # Ok(())
/// # }
/// ```
pub async fn add_link<'a, T, O>(&self, name: T, object: O) -> Result<ObjectInfo, AddLinkError>
pub async fn add_link<T, O>(&self, name: T, object: O) -> Result<ObjectInfo, AddLinkError>
where
T: ToString,
O: AsObjectInfo,
Expand Down
2 changes: 1 addition & 1 deletion nats-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ rand = "0.8"
tokio-retry = "0.3.0"

[dev-dependencies]
async-nats = "0.31"
async-nats = "0.38"
tokio = { version = "1", features = ["full"] }
futures = "0.3"
2 changes: 1 addition & 1 deletion nats/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ json = "0.12.4"
lazy_static = "1.4.0"
log = "0.4.14"
nkeys = "0.4.1"
nuid = "0.3.1"
nuid = "0.5.0"
once_cell = "1.8.0"
parking_lot = "0.12.0"
portable-atomic = "1"
Expand Down
2 changes: 1 addition & 1 deletion nats/src/object_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ impl ObjectStore {
description: object_meta.description,
link: object_meta.link,
bucket: self.name.clone(),
nuid: object_nuid,
nuid: object_nuid.to_string(),
chunks: object_chunks,
size: object_size,
digest: format!("SHA-256={}", base64::encode_config(digest, URL_SAFE)),
Expand Down
Loading