Skip to content

Commit

Permalink
fix test running
Browse files Browse the repository at this point in the history
  • Loading branch information
beanpuppy committed Jan 9, 2024
1 parent 75e61a7 commit 02e47bf
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/rust.yml
Expand Up @@ -31,5 +31,8 @@ jobs:
- name: Build
run: cargo build --verbose

- name: Run tests
run: cargo test --all-features --verbose
- name: Run async tests
run: cargo test

- name: Run blocking tests
run: cargo test --features=blocking
12 changes: 6 additions & 6 deletions src/lib.rs
Expand Up @@ -7,10 +7,10 @@
//! To create an OAuth client with the reddit API, use the `Reddit` class.
//! ```no_run
//! use roux::Reddit;
//! #[cfg(feature = "async")]
//! #[cfg(not(feature = "blocking"))]
//! use tokio;
//!
//! #[cfg_attr(feature = "async", tokio::main)]
//! #[cfg_attr(not(feature = "blocking"), tokio::main)]
//! #[maybe_async::maybe_async]
//! async fn main() {
//! let client = Reddit::new("USER_AGENT", "CLIENT_ID", "CLIENT_SECRET")
Expand All @@ -34,10 +34,10 @@
//! ### Submit A Text Post
//! ```no_run
//! use roux::Reddit;
//! #[cfg(feature = "async")]
//! #[cfg(not(feature = "blocking"))]
//! use tokio;
//!
//! #[cfg_attr(feature = "async", tokio::main)]
//! #[cfg_attr(not(feature = "blocking"), tokio::main)]
//! #[maybe_async::maybe_async]
//! async fn main() {
//! let client = Reddit::new("USER_AGENT", "CLIENT_ID", "CLIENT_SECRET")
Expand All @@ -54,10 +54,10 @@
//! ### Submit A Link Post
//! ```no_run
//! use roux::Reddit;
//! #[cfg(feature = "async")]
//! #[cfg(not(feature = "blocking"))]
//! use tokio;
//!
//! #[cfg_attr(feature = "async", tokio::main)]
//! #[cfg_attr(not(feature = "blocking"), tokio::main)]
//! #[maybe_async::maybe_async]
//! async fn main() {
//! let client = Reddit::new("USER_AGENT", "CLIENT_ID", "CLIENT_SECRET")
Expand Down
8 changes: 4 additions & 4 deletions src/models/subreddit/mod.rs
Expand Up @@ -4,10 +4,10 @@
//! # Basic Usage
//! ```no_run
//! use roux::Subreddit;
//! #[cfg(feature = "async")]
//! #[cfg(not(feature = "blocking"))]
//! use tokio;
//!
//! #[cfg_attr(feature = "async", tokio::main)]
//! #[cfg_attr(not(feature = "blocking"), tokio::main)]
//! #[maybe_async::maybe_async]
//! async fn main() {
//! let subreddit = Subreddit::new("rust");
Expand Down Expand Up @@ -40,10 +40,10 @@
//! ```no_run
//! use roux::Subreddit;
//! use roux::util::{FeedOption, TimePeriod};
//! #[cfg(feature = "async")]
//! #[cfg(not(feature = "blocking"))]
//! use tokio;
//!
//! #[cfg_attr(feature = "async", tokio::main)]
//! #[cfg_attr(not(feature = "blocking"), tokio::main)]
//! #[maybe_async::maybe_async]
//! async fn main() {
//! let subreddit = Subreddit::new("astolfo");
Expand Down
4 changes: 2 additions & 2 deletions src/models/user/mod.rs
Expand Up @@ -5,10 +5,10 @@
//! ```no_run
//! use roux::User;
//! use roux::util::FeedOption;
//! #[cfg(feature = "async")]
//! #[cfg(not(feature = "blocking"))]
//! use tokio;
//!
//! #[cfg_attr(feature = "async", tokio::main)]
//! #[cfg_attr(not(feature = "blocking"), tokio::main)]
//! #[maybe_async::maybe_async]
//! async fn main() {
//! let user = User::new("kasuporo");
Expand Down

0 comments on commit 02e47bf

Please sign in to comment.