Disable redis tests outside of CI

...to not annoy people like me who don't have redis open while testing
This commit is contained in:
Maybe Waffle 2022-03-14 19:28:20 +04:00
parent 484d1ccd83
commit 8ae3222409
2 changed files with 6 additions and 0 deletions

View file

@ -6,6 +6,9 @@ on:
name: Continuous integration
env:
RUSTFLAGS: "--cfg CI_REDIS"
jobs:
style:
runs-on: ubuntu-latest

View file

@ -5,6 +5,7 @@ use std::{
use teloxide::dispatching::dialogue::{RedisStorage, RedisStorageError, Serializer, Storage};
#[tokio::test]
#[cfg_attr(not(CI_REDIS), ignore)]
async fn test_redis_json() {
let storage = RedisStorage::open(
"redis://127.0.0.1:7777",
@ -16,6 +17,7 @@ async fn test_redis_json() {
}
#[tokio::test]
#[cfg_attr(not(CI_REDIS), ignore)]
async fn test_redis_bincode() {
let storage = RedisStorage::open(
"redis://127.0.0.1:7778",
@ -27,6 +29,7 @@ async fn test_redis_bincode() {
}
#[tokio::test]
#[cfg_attr(not(CI_REDIS), ignore)]
async fn test_redis_cbor() {
let storage = RedisStorage::open(
"redis://127.0.0.1:7779",