Add support for Tokio

This commit is contained in:
Ryan Leckey
2020-01-15 01:17:33 -08:00
parent 96f14c0700
commit 92f12e11aa
26 changed files with 256 additions and 98 deletions

View File

@@ -50,9 +50,15 @@ jobs:
# -----------------------------------------------------
# Check that we build with TLS support (TODO: we need a postgres image with SSL certs to test)
- run: cargo check -p sqlx-core --no-default-features --features 'postgres macros uuid chrono tls'
- run: cargo check -p sqlx-core --no-default-features --features 'runtime-async-std postgres macros uuid chrono tls'
- run: cargo test -p sqlx --no-default-features --features 'postgres macros uuid chrono'
# Test on async-std
- run: cargo test -p sqlx --no-default-features --features 'runtime-async-std postgres macros uuid chrono'
env:
DATABASE_URL: postgres://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres
# Test on tokio
- run: cargo test -p sqlx --no-default-features --features 'runtime-tokio postgres macros uuid chrono'
env:
DATABASE_URL: postgres://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres

View File

@@ -32,9 +32,13 @@ jobs:
# -----------------------------------------------------
- run: cargo check --all-features
- run: cargo check --no-default-features --features 'chrono uuid postgres mysql macros tls runtime-async-std'
- run: cargo test -p sqlx-core --all-features
- run: cargo check --no-default-features --features 'chrono uuid postgres mysql macros tls runtime-tokio'
- run: cargo test -p sqlx-core --no-default-features --features 'chrono uuid postgres mysql macros tls runtime-async-std'
- run: cargo test -p sqlx-core --no-default-features --features 'chrono uuid postgres mysql macros tls runtime-tokio'
# Rust ------------------------------------------------