#115: implement time-rs support

This commit is contained in:
Vlad Stepanov
2020-02-29 22:38:48 +03:00
parent 80f402b7e6
commit 084add9cdb
17 changed files with 958 additions and 36 deletions

View File

@@ -39,25 +39,25 @@ jobs:
# check w/deny warnings in sqlx-core: async-std
- working-directory: sqlx-core
run: cargo rustc --no-default-features --features 'chrono uuid postgres mysql tls runtime-async-std' -- -D warnings --emit=metadata
run: cargo rustc --no-default-features --features 'chrono time uuid postgres mysql tls runtime-async-std' -- -D warnings --emit=metadata
# check w/deny warnings in sqlx-core: tokio
# `cargo rustc -p sqlx-core` ignores `--no-default-features` and builds with `runtime-async-std` anyway
# https://github.com/rust-lang/cargo/issues/5364
- working-directory: sqlx-core
run: cargo rustc --no-default-features --features 'chrono uuid postgres mysql tls runtime-tokio' -- -D warnings --emit=metadata
run: cargo rustc --no-default-features --features 'chrono time uuid postgres mysql tls runtime-tokio' -- -D warnings --emit=metadata
# check w/deny warnings: async-std
- run: cargo rustc --no-default-features --features 'chrono uuid postgres mysql macros tls runtime-async-std' -- -D warnings --emit=metadata
- run: cargo rustc --no-default-features --features 'chrono time uuid postgres mysql macros tls runtime-async-std' -- -D warnings --emit=metadata
# check w/deny warnings: tokio
- run: cargo rustc --no-default-features --features 'chrono uuid postgres mysql macros tls runtime-tokio' -- -D warnings --emit=metadata
- run: cargo rustc --no-default-features --features 'chrono time uuid postgres mysql macros tls runtime-tokio' -- -D warnings --emit=metadata
# unit test: async-std
- run: cargo test --manifest-path sqlx-core/Cargo.toml --no-default-features --features 'chrono uuid postgres mysql tls runtime-async-std'
- run: cargo test --manifest-path sqlx-core/Cargo.toml --no-default-features --features 'chrono time uuid postgres mysql tls runtime-async-std'
# unit test: tokio
- run: cargo test --manifest-path sqlx-core/Cargo.toml --no-default-features --features 'chrono uuid postgres mysql tls runtime-tokio'
- run: cargo test --manifest-path sqlx-core/Cargo.toml --no-default-features --features 'chrono time uuid postgres mysql tls runtime-tokio'
# Rust ------------------------------------------------
@@ -110,16 +110,37 @@ jobs:
# -----------------------------------------------------
# integration test: async-std
# integration test: async-std (chrono)
- run: cargo test --no-default-features --features 'runtime-async-std postgres macros uuid chrono tls'
env:
DATABASE_URL: postgres://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres
# integration test: tokio
# integration test: async-std (time)
- run: cargo test --no-default-features --features 'runtime-async-std postgres macros uuid time tls'
env:
DATABASE_URL: postgres://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres
# integration test: async-std (time + chrono)
- run: cargo test --no-default-features --features 'runtime-async-std postgres macros uuid time chrono tls'
env:
DATABASE_URL: postgres://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres
# integration test: tokio (chrono)
- run: cargo test --no-default-features --features 'runtime-tokio postgres macros uuid chrono tls'
env:
DATABASE_URL: postgres://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres
# integration test: tokio (time)
- run: cargo test --no-default-features --features 'runtime-tokio postgres macros uuid time tls'
env:
DATABASE_URL: postgres://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres
# integration test: tokio (time + chrono)
- run: cargo test --no-default-features --features 'runtime-tokio postgres macros uuid time chrono tls'
env:
DATABASE_URL: postgres://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres
mysql:
needs: build
runs-on: ubuntu-latest
@@ -162,20 +183,49 @@ jobs:
# -----------------------------------------------------
# integration test: async-std
# integration test: async-std (chrono)
- run: cargo test --no-default-features --features 'runtime-async-std mysql macros uuid chrono tls'
env:
# pass the path to the CA that the MySQL service generated
# NOTE: Github Actions' YML parser doesn't handle multiline strings correctly
DATABASE_URL: mysql://root:password@localhost:${{ job.services.mysql.ports[3306] }}/sqlx?ssl-mode=VERIFY_CA&ssl-ca=%2Fdata%2Fmysql%2Fca.pem
# integration test: tokio
# integration test: async-std (time)
- run: cargo test --no-default-features --features 'runtime-async-std mysql macros uuid time tls'
env:
# pass the path to the CA that the MySQL service generated
# NOTE: Github Actions' YML parser doesn't handle multiline strings correctly
DATABASE_URL: mysql://root:password@localhost:${{ job.services.mysql.ports[3306] }}/sqlx?ssl-mode=VERIFY_CA&ssl-ca=%2Fdata%2Fmysql%2Fca.pem
# integration test: async-std (time + chrono)
- run: cargo test --no-default-features --features 'runtime-async-std mysql macros uuid time chrono tls'
env:
# pass the path to the CA that the MySQL service generated
# NOTE: Github Actions' YML parser doesn't handle multiline strings correctly
DATABASE_URL: mysql://root:password@localhost:${{ job.services.mysql.ports[3306] }}/sqlx?ssl-mode=VERIFY_CA&ssl-ca=%2Fdata%2Fmysql%2Fca.pem
# integration test: tokio (chrono)
- run: cargo test --no-default-features --features 'runtime-tokio mysql macros uuid chrono tls'
env:
# pass the path to the CA that the MySQL service generated
# NOTE: Github Actions' YML parser doesn't handle multiline strings correctly
DATABASE_URL: mysql://root:password@localhost:${{ job.services.mysql.ports[3306] }}/sqlx?ssl-mode=VERIFY_CA&ssl-ca=%2Fdata%2Fmysql%2Fca.pem
# integration test: tokio (time)
- run: cargo test --no-default-features --features 'runtime-tokio mysql macros uuid time tls'
env:
# pass the path to the CA that the MySQL service generated
# NOTE: Github Actions' YML parser doesn't handle multiline strings correctly
DATABASE_URL: mysql://root:password@localhost:${{ job.services.mysql.ports[3306] }}/sqlx?ssl-mode=VERIFY_CA&ssl-ca=%2Fdata%2Fmysql%2Fca.pem
# integration test: tokio (time + chrono)
- run: cargo test --no-default-features --features 'runtime-tokio mysql macros uuid time chrono tls'
env:
# pass the path to the CA that the MySQL service generated
# NOTE: Github Actions' YML parser doesn't handle multiline strings correctly
DATABASE_URL: mysql://root:password@localhost:${{ job.services.mysql.ports[3306] }}/sqlx?ssl-mode=VERIFY_CA&ssl-ca=%2Fdata%2Fmysql%2Fca.pem
mariadb:
needs: build
runs-on: ubuntu-latest
@@ -216,12 +266,32 @@ jobs:
# -----------------------------------------------------
# integration test: async-std
- run: cargo test --no-default-features --features 'runtime-async-std mysql macros chrono uuid chrono tls'
# integration test: async-std (chrono)
- run: cargo test --no-default-features --features 'runtime-async-std mysql macros chrono uuid tls'
env:
DATABASE_URL: mariadb://root:password@localhost:${{ job.services.mariadb.ports[3306] }}/sqlx
# integration test: tokio
# integration test: async-std (time)
- run: cargo test --no-default-features --features 'runtime-async-std mysql macros time uuid tls'
env:
DATABASE_URL: mariadb://root:password@localhost:${{ job.services.mariadb.ports[3306] }}/sqlx
# integration test: async-std (time + chrono)
- run: cargo test --no-default-features --features 'runtime-async-std mysql macros time chrono uuid tls'
env:
DATABASE_URL: mariadb://root:password@localhost:${{ job.services.mariadb.ports[3306] }}/sqlx
# integration test: tokio (chrono)
- run: cargo test --no-default-features --features 'runtime-tokio mysql macros uuid chrono tls'
env:
DATABASE_URL: mariadb://root:password@localhost:${{ job.services.mariadb.ports[3306] }}/sqlx
# integration test: tokio (time)
- run: cargo test --no-default-features --features 'runtime-tokio mysql macros uuid time tls'
env:
DATABASE_URL: mariadb://root:password@localhost:${{ job.services.mariadb.ports[3306] }}/sqlx
# integration test: tokio (time + chrono)
- run: cargo test --no-default-features --features 'runtime-tokio mysql macros uuid time chrono tls'
env:
DATABASE_URL: mariadb://root:password@localhost:${{ job.services.mariadb.ports[3306] }}/sqlx