Skip to content

Commit

Permalink
add initial tokio-postgres support
Browse files Browse the repository at this point in the history
  • Loading branch information
jxs committed Dec 15, 2019
1 parent a488457 commit abfed19
Show file tree
Hide file tree
Showing 8 changed files with 835 additions and 13 deletions.
16 changes: 16 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,22 @@ jobs:
- checkout
- run: cargo build -p refinery_cli
- run: cd refinery && cargo test -p refinery --features "tpostgres" --test postgres -- --test-threads 1
test-tokio-postgres-stable:
docker:
- image: << pipeline.parameters.stable >>
- image: postgres:9.6.13-alpine
steps:
- checkout
- run: cargo build -p refinery_cli
- run: cd refinery && cargo test -p refinery --features "ttokio-postgres" --test tokio-postgres -- --test-threads 1
test-tokio-postgres-nightly:
docker:
- image: << pipeline.parameters.nightly >>
- image: postgres:9.6.13-alpine
steps:
- checkout
- run: cargo build -p refinery_cli
- run: cd refinery && cargo test -p refinery --features "ttokio-postgres" --test tokio-postgres -- --test-threads 1
test-mysql-previous:
docker:
- image: << pipeline.parameters.previous >>
Expand Down
6 changes: 6 additions & 0 deletions refinery/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ edition = "2018"
default = []
rusqlite = ["refinery-migrations/rusqlite", "barrel/sqlite3"]
postgres = ["refinery-migrations/postgres", "barrel/pg"]
tokio-postgres = ["refinery-migrations/tokio-postgres"]
mysql = ["refinery-migrations/mysql", "barrel/mysql"]

#testing features
trusqlite = ["mysql", "postgres", "rusqlite", "refinery-migrations/mysql", "refinery-migrations/postgres", "refinery-migrations/rusqlite", "mod_migrations/sqlite"]
tpostgres = ["mysql", "postgres", "rusqlite", "refinery-migrations/mysql", "refinery-migrations/postgres", "refinery-migrations/rusqlite", "mod_migrations/pg"]
ttokio-postgres = ["refinery-migrations/tokio-postgres", "mod_migrations/pg"]

tmysql = ["mysql", "postgres", "rusqlite", "refinery-migrations/mysql", "refinery-migrations/postgres", "refinery-migrations/rusqlite", "mod_migrations/mysql"]

[dependencies]
Expand All @@ -30,6 +33,9 @@ barrel = "0.5.3"
[dev-dependencies]
ttrusqlite = {package = "rusqlite", version = "0.18.0"}
ttpostgres = {package = "postgres", version = "0.15"}
ttokio_postgres = {package = "tokio-postgres", version = "0.5.0-alpha.2" }
tokio = { version = "0.2", features = ["full"] }
futures = "0.3.1"
ttmysql = {package = "mysql", version = "16.0"}

mod_migrations = {path = "./tests/mod_migrations"}
Expand Down
Loading

0 comments on commit abfed19

Please sign in to comment.