Update dependencies

This commit is contained in:
Luca Palmieri 2024-08-29 14:54:52 +02:00
parent 874b4fd467
commit f4f8b79e25
4 changed files with 936 additions and 756 deletions

View file

@ -10,13 +10,13 @@ on:
branches:
- root-chapter-03-part1
pull_request:
types: [ opened, synchronize, reopened ]
types: [opened, synchronize, reopened]
branches:
- root-chapter-03-part1
env:
CARGO_TERM_COLOR: always
SQLX_VERSION: 0.7.1
SQLX_VERSION: 0.8.0
SQLX_FEATURES: "rustls,postgres"
# A workflow run is made up of one or more jobs, which run in parallel by default
@ -32,7 +32,7 @@ jobs:
services:
# Label used to access the service container
postgres:
# Docker Hub image
# Docker Hub image
image: postgres:14
# Environment variables scoped only for the `postgres` element
env:
@ -44,14 +44,14 @@ jobs:
ports:
- 5432:5432
steps:
# Downloads a copy of the code in your repository before running CI tests
# Downloads a copy of the code in your repository before running CI tests
- name: Check out repository code
# The uses keyword specifies that this step will run v3 of the actions/checkout action.
# The uses keyword specifies that this step will run v3 of the actions/checkout action.
# This is an action that checks out your repository onto the runner, allowing you to run scripts or other actions against your code (such as build and test tools).
# You should use the checkout action any time your workflow will run against the repository's code.
uses: actions/checkout@v3
# This GitHub Action installs a Rust toolchain using rustup. It is designed for one-line concise usage and good defaults.
# This GitHub Action installs a Rust toolchain using rustup. It is designed for one-line concise usage and good defaults.
- name: Install the Rust toolchain
uses: dtolnay/rust-toolchain@stable
@ -64,14 +64,14 @@ jobs:
- name: Install sqlx-cli
run:
cargo install sqlx-cli
--version=${{ env.SQLX_VERSION }}
--features ${{ env.SQLX_FEATURES }}
--no-default-features
--locked
# The --locked flag can be used to force Cargo to use the packaged Cargo.lock file if it is available.
# This may be useful for ensuring reproducible builds, to use the exact same set of dependencies that were available when the package was published.
# It may also be useful if a newer version of a dependency is published that no longer builds on your system, or has other problems
cargo install sqlx-cli
--version=${{ env.SQLX_VERSION }}
--features ${{ env.SQLX_FEATURES }}
--no-default-features
--locked
# The --locked flag can be used to force Cargo to use the packaged Cargo.lock file if it is available.
# This may be useful for ensuring reproducible builds, to use the exact same set of dependencies that were available when the package was published.
# It may also be useful if a newer version of a dependency is published that no longer builds on your system, or has other problems
- name: Install postgresql-client
run: sudo apt-get update && sudo apt-get install postgresql-client -y
@ -117,12 +117,11 @@ jobs:
with:
key: sqlx-${{ env.SQLX_VERSION }}
- name: Install sqlx-cli
run:
cargo install sqlx-cli
--version=${{ env.SQLX_VERSION }}
--features ${{ env.SQLX_FEATURES }}
--no-default-features
--locked
run: cargo install sqlx-cli
--version=${{ env.SQLX_VERSION }}
--features ${{ env.SQLX_FEATURES }}
--no-default-features
--locked
- name: Install postgresql-client
run: sudo apt-get update && sudo apt-get install postgresql-client -y
- name: Migrate database
@ -153,8 +152,7 @@ jobs:
with:
key: sqlx-${{ env.SQLX_VERSION }}
- name: Install sqlx-cli
run:
cargo install sqlx-cli
run: cargo install sqlx-cli
--version=${{ env.SQLX_VERSION }}
--features ${{ env.SQLX_FEATURES }}
--no-default-features

1635
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -16,10 +16,17 @@ name = "zero2prod"
actix-web = "4"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
serde = "1.0.115"
config = { version = "0.13", default-features = false, features = ["yaml"] }
sqlx = { version = "0.7", default-features = false, features = ["runtime-tokio-rustls", "macros", "postgres", "uuid", "chrono", "migrate"] }
config = { version = "0.14", default-features = false, features = ["yaml"] }
sqlx = { version = "0.8", default-features = false, features = [
"runtime-tokio-rustls",
"macros",
"postgres",
"uuid",
"chrono",
"migrate",
] }
uuid = { version = "1", features = ["v4"] }
chrono = { version = "0.4.22", default-features = false, features = ["clock"] }
[dev-dependencies]
reqwest = { version = "0.11", features = ["json"] }
reqwest = { version = "0.12", features = ["json"] }

View file

@ -10,7 +10,7 @@ fi
if ! [ -x "$(command -v sqlx)" ]; then
echo >&2 "Error: sqlx is not installed."
echo >&2 "Use:"
echo >&2 " cargo install --version='~0.7' sqlx-cli --no-default-features --features rustls,postgres"
echo >&2 " cargo install --version='~0.8' sqlx-cli --no-default-features --features rustls,postgres"
echo >&2 "to install it."
exit 1
fi