mirror of
https://github.com/LukeMathWalker/zero-to-production.git
synced 2024-11-24 09:41:03 +00:00
Update to tokio 1.
This commit is contained in:
parent
6c18494507
commit
d5e09e849b
5 changed files with 396 additions and 1019 deletions
6
.github/workflows/general.yml
vendored
6
.github/workflows/general.yml
vendored
|
@ -38,7 +38,7 @@ jobs:
|
|||
- name: Migrate database
|
||||
run: |
|
||||
sudo apt-get install libpq-dev -y
|
||||
cargo install --version=0.2.0 sqlx-cli --no-default-features --features postgres
|
||||
cargo install --version=0.5.1 sqlx-cli --no-default-features --features postgres
|
||||
SKIP_DOCKER=true ./scripts/init_db.sh
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
|
@ -81,7 +81,7 @@ jobs:
|
|||
- name: Migrate database
|
||||
run: |
|
||||
sudo apt-get install libpq-dev -y
|
||||
cargo install --version=0.2.0 sqlx-cli --no-default-features --features postgres
|
||||
cargo install --version=0.5.1 sqlx-cli --no-default-features --features postgres
|
||||
SKIP_DOCKER=true ./scripts/init_db.sh
|
||||
- uses: actions-rs/clippy-check@v1
|
||||
with:
|
||||
|
@ -113,7 +113,7 @@ jobs:
|
|||
- name: Migrate database
|
||||
run: |
|
||||
sudo apt-get install libpq-dev -y
|
||||
cargo install --version=0.2.0 sqlx-cli --no-default-features --features postgres
|
||||
cargo install --version=0.5.1 sqlx-cli --no-default-features --features postgres
|
||||
SKIP_DOCKER=true ./scripts/init_db.sh
|
||||
- name: Run cargo-tarpaulin
|
||||
uses: actions-rs/tarpaulin@v0.1
|
||||
|
|
1391
Cargo.lock
generated
1391
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
14
Cargo.toml
14
Cargo.toml
|
@ -13,21 +13,19 @@ path = "src/main.rs"
|
|||
name = "zero2prod"
|
||||
|
||||
[dependencies]
|
||||
actix-web = "3.0.0"
|
||||
actix-rt = "1.1.1"
|
||||
tokio = "0.2.22"
|
||||
actix-web = "4.0.0-beta.3"
|
||||
serde = "1.0.115"
|
||||
config = { version = "0.10.1", default-features = false, features = ["yaml"] }
|
||||
sqlx = { version = "0.4.1", default-features = false, features = [ "runtime-actix-rustls", "macros", "postgres", "uuid", "chrono", "migrate", "offline"] }
|
||||
sqlx = { version = "0.5.1", default-features = false, features = [ "runtime-actix-rustls", "macros", "postgres", "uuid", "chrono", "migrate", "offline"] }
|
||||
uuid = { version = "0.8.1", features = ["v4"] }
|
||||
chrono = "0.4.15"
|
||||
reqwest = { version = "0.10", default-features = false, features = ["json", "rustls-tls"] }
|
||||
reqwest = { version = "0.11", default-features = false, features = ["json", "rustls-tls"] }
|
||||
tracing = "0.1.19"
|
||||
tracing-futures = "0.2.4"
|
||||
tracing-subscriber = { version = "0.2.12", features = ["registry", "env-filter"] }
|
||||
tracing-bunyan-formatter = "0.1.6"
|
||||
tracing-log = "0.1.1"
|
||||
tracing-actix-web = "0.2.0"
|
||||
tracing-actix-web = "0.3.0-beta.2"
|
||||
serde-aux = "1.0.1"
|
||||
unicode-segmentation = "1.7.1"
|
||||
validator = "0.12.0"
|
||||
|
@ -38,5 +36,7 @@ claim = "0.4.0"
|
|||
quickcheck = "0.9.2"
|
||||
quickcheck_macros = "0.9.1"
|
||||
fake = "~2.3.0"
|
||||
wiremock = "0.4.7"
|
||||
wiremock = "0.4.9"
|
||||
serde_json = "1.0.61"
|
||||
actix-rt = "2"
|
||||
tokio = { version = "1", features = ["macros"] }
|
||||
|
|
|
@ -173,7 +173,7 @@ mod tests {
|
|||
assert_err!(outcome);
|
||||
}
|
||||
|
||||
#[tokio::test(threaded_scheduler)]
|
||||
#[tokio::test]
|
||||
async fn send_email_times_out_if_the_server_takes_too_long() {
|
||||
// Arrange
|
||||
let mock_server = MockServer::start().await;
|
||||
|
|
|
@ -5,7 +5,7 @@ use zero2prod::email_client::EmailClient;
|
|||
use zero2prod::startup::run;
|
||||
use zero2prod::telemetry::{get_subscriber, init_subscriber};
|
||||
|
||||
#[actix_rt::main]
|
||||
#[actix_web::main]
|
||||
async fn main() -> std::io::Result<()> {
|
||||
let subscriber = get_subscriber("zero2prod".into(), "info".into());
|
||||
init_subscriber(subscriber);
|
||||
|
|
Loading…
Reference in a new issue