Skip to content

Commit

Permalink
feat(ci): 👷 Add MongoDB service to CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Srylax committed May 7, 2024
1 parent b45e87b commit c0116b4
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 44 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ jobs:
test:
name: Test
runs-on: ubuntu-latest
services:
mongo:
image: mongo
ports:
- 27017:27017
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -46,9 +51,36 @@ jobs:
run: cargo test --no-run
- name: Test
run: cargo hack test --feature-powerset
examples:
name: Examples
runs-on: ubuntu-latest
services:
mongo:
image: mongo
ports:
- 27017:27017
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: Run example default
run: cargo run --example default --verbose
- name: Run example multisort
run: cargo run --example multisort --verbose
- name: Run example regex
run: cargo run --example regex --verbose
msrv:
name: "Check MSRV"
runs-on: ubuntu-latest
services:
mongo:
image: mongo
ports:
- 27017:27017
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
37 changes: 0 additions & 37 deletions .github/workflows/rust.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions committed.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
style = "conventional"
ignore_author_re = "(dependabot|renovate)"
merge_commit = false
subject_length = 72
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
//! ### Usage:
//! The usage is a bit different than the node version. See the examples for more details and a working example.
//! ```rust
//! use bson::doc;
//! use mongodb::{options::FindOptions, Client};
//! use mongodb_cursor_pagination::{FindResult, Pagination};
//! use bson::doc;
//! use serde::Deserialize;
//!
//! // Note that your data structure must derive Deserialize
Expand Down Expand Up @@ -51,9 +51,9 @@
//!
//! // query page 1, 2 at a time
//! let options = FindOptions::builder()
//! .limit(2)
//! .sort(doc! { "name": 1 })
//! .build();
//! .limit(2)
//! .sort(doc! { "name": 1 })
//! .build();
//!
//! let mut find_results: FindResult<MyFruit> = fruits
//! .find_paginated(None, Some(options.clone()), None)
Expand Down Expand Up @@ -86,7 +86,7 @@
//! pub has_next_page: bool,
//! pub has_previous_page: bool,
//! pub start_cursor: Option<String>,
//! pub next_cursor: Option<String>,
//! pub end_cursor: Option<String>,
//! }
//!
//! pub struct Edge {
Expand Down
1 change: 1 addition & 0 deletions src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ impl<'de> Deserialize<'de> for Edge {

#[cfg(feature = "graphql")]
#[juniper::graphql_object]
#[allow(clippy::multiple_inherent_impl)]
impl Edge {
fn cursor(&self) -> String {
self.0.to_string()
Expand Down

0 comments on commit c0116b4

Please sign in to comment.