-
-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
834 changed files
with
77,330 additions
and
20,257 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ on: | |
|
||
env: | ||
RUSTFLAGS: -Dwarnings | ||
rust_min: 1.73 | ||
rust_min: 1.75 | ||
|
||
jobs: | ||
format: | ||
|
@@ -74,16 +74,13 @@ jobs: | |
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
runtime: | ||
features: | ||
[ | ||
async-std-surf, | ||
tokio-hyper, | ||
tokio-hyper-rustls, | ||
tokio-hyper-rustls-webpki, | ||
blocking, | ||
blocking-rustls, | ||
blocking-rustls-webpki, | ||
default-tls, | ||
rustls-tls-webpki-roots, | ||
rustls-tls-native, | ||
] | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
@@ -97,21 +94,45 @@ jobs: | |
- uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Run clippy | ||
run: cargo clippy --features "runtime-${{ matrix.runtime }} full serialize deserialize" | ||
run: cargo clippy --no-default-features --features "full serialize deserialize ${{ matrix.features }}" | ||
|
||
test-clients: | ||
name: Test Clients | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
features: | ||
[ | ||
default-tls, | ||
rustls-tls-webpki-roots, | ||
rustls-tls-native, | ||
] | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
||
test: | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: ${{ env.rust_min }} | ||
components: clippy | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Run tests | ||
run: cargo test --no-default-features --features "full serialize deserialize ${{ matrix.features }}" | ||
|
||
stripe-mock-tests: | ||
name: Stripe Mock Tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
runtime: | ||
features: | ||
[ | ||
async-std-surf, | ||
tokio-hyper, | ||
tokio-hyper-rustls, | ||
tokio-hyper-rustls-webpki, | ||
blocking, | ||
blocking-rustls, | ||
blocking-rustls-webpki, | ||
default-tls, | ||
rustls-tls-webpki-roots, | ||
rustls-tls-native, | ||
] | ||
services: | ||
stripe-mock: | ||
|
@@ -128,20 +149,9 @@ jobs: | |
toolchain: ${{ env.rust_min }} | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
- name: Run stripe mock tests | ||
run: cargo test -p async-stripe-tests --no-default-features --features ${{ matrix.features }} | ||
|
||
- uses: taiki-e/install-action@cargo-llvm-cov | ||
- name: Test and gather coverage | ||
run: cargo llvm-cov --lcov --output-path lcov.info --features "runtime-${{ matrix.runtime }} serialize deserialize" | ||
- name: Upload to codecov.io | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{secrets.CODECOV_TOKEN}} | ||
files: lcov.info | ||
- name: Archive code coverage results | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: code-coverage-report | ||
path: lcov.info | ||
|
||
docs: | ||
name: Docs | ||
|
@@ -155,7 +165,7 @@ jobs: | |
- uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Build Documentation | ||
run: cargo doc --lib --no-deps --features "runtime-tokio-hyper full" | ||
run: cargo doc --lib --no-deps --features "full serialize deserialize" | ||
|
||
# Examples tested separately so that we can use crates which don't match our MSRV | ||
examples: | ||
|
@@ -170,4 +180,4 @@ jobs: | |
- uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Check examples | ||
run: cargo clippy --features "runtime-tokio-hyper-rustls" --workspace | ||
run: cargo clippy --workspace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
[workspace] | ||
members = [ | ||
"async-stripe", | ||
"stripe_types", | ||
"stripe_webhook", | ||
"tests", | ||
"generated/*", | ||
"examples/*", | ||
"stripe_client_core", | ||
"async-stripe", | ||
"stripe_async_std" | ||
] | ||
|
||
# Skip "examples/*" when running default commands since that adds a bunch of deps that makes | ||
# development feedback loop slower | ||
default-members = ["async-stripe", "stripe_types", "stripe_webhook", "tests", "generated/*"] | ||
# development feedback loop slower. | ||
default-members = ["async-stripe", "stripe_types", "stripe_webhook", "stripe_client_core", "generated/*", "stripe_async_std"] | ||
resolver = "2" | ||
# Makes dependency management simpler to allow codegen crate to use whichever dep versions | ||
# it wants without affecting dependency resolution of the user-facing library crates | ||
|
@@ -19,7 +21,7 @@ exclude = ["openapi"] | |
[workspace.package] | ||
version = "0.22.2" | ||
description = "API bindings for the Stripe HTTP API" | ||
rust-version = "1.73.0" | ||
rust-version = "1.75.0" | ||
authors = [ | ||
"Anna Baldwin <[email protected]>", | ||
"Kevin Stenerson <[email protected]>", | ||
|
@@ -37,7 +39,7 @@ edition = "2021" | |
|
||
[workspace.dependencies] | ||
serde = { version = ">=1.0.79", features = ["derive"] } # we use `serde(other)` which was introduced in 1.0.79 | ||
serde_json = "1" | ||
http-types = { version = "2.12.0", default-features = false } | ||
smol_str = { version = "0.2.0", features = ["serde"] } | ||
miniserde = "0.1.34" | ||
serde_json = "1.0.115" | ||
serde_qs = "0.12.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,106 +1,47 @@ | ||
[package] | ||
name = "async-stripe" | ||
version.workspace = true | ||
edition.workspace = true | ||
description.workspace = true | ||
rust-version.workspace = true | ||
authors.workspace = true | ||
license.workspace = true | ||
readme.workspace = true | ||
homepage.workspace = true | ||
repository.workspace = true | ||
documentation.workspace = true | ||
keywords.workspace = true | ||
categories.workspace = true | ||
|
||
[package.metadata.docs.rs] | ||
features = ["runtime-tokio-hyper"] | ||
edition.workspace = true | ||
|
||
[lib] | ||
name = "stripe" | ||
|
||
[features] | ||
default = ["uuid", "stream"] | ||
|
||
stream = [] | ||
|
||
# runtimes | ||
async = ["futures-util"] | ||
blocking = [] | ||
|
||
runtime-tokio-hyper = [ | ||
"tokio", | ||
"hyper-client", | ||
"hyper-tls", | ||
"async", | ||
] | ||
runtime-tokio-hyper-rustls = [ | ||
"tokio", | ||
"hyper-client", | ||
"hyper-rustls", | ||
"hyper-rustls-native", | ||
"async", | ||
] | ||
runtime-tokio-hyper-rustls-webpki = [ | ||
"tokio", | ||
"hyper-client", | ||
"hyper-rustls-webpki", | ||
"async", | ||
] | ||
runtime-blocking = [ | ||
"tokio", | ||
"tokio/rt", | ||
"hyper-client", | ||
"hyper-tls", | ||
"blocking", | ||
] | ||
runtime-blocking-rustls = [ | ||
"tokio", | ||
"tokio/rt", | ||
"hyper-client", | ||
"hyper-rustls-native", | ||
"blocking", | ||
] | ||
runtime-blocking-rustls-webpki = [ | ||
"tokio", | ||
"tokio/rt", | ||
"hyper-client", | ||
"hyper-rustls-webpki", | ||
"blocking", | ||
] | ||
runtime-async-std-surf = [ | ||
"async-std", | ||
"surf", | ||
"async", | ||
] | ||
[dependencies] | ||
hyper = { version = "0.14.28", default-features = false, features = ["http1", "http2", "client", "tcp"] } | ||
hyper-tls = { version = "0.5", optional = true } | ||
hyper-rustls = { version = "0.24", default-features = false, features = ["http1", "http2", "tls12", "logging"], optional = true } | ||
thiserror = "1.0.58" | ||
miniserde.workspace = true | ||
tokio = { version = "1.24.1", features = ["rt", "macros"] } | ||
|
||
# we need the compat crate if using hyper | ||
hyper-client = ["hyper", "http-types/hyperium_http"] | ||
stripe_shared = { path = "../generated/stripe_shared" } | ||
stripe_client_core = { path = "../stripe_client_core" } | ||
|
||
hyper-rustls-native = ["hyper-rustls", "hyper-rustls/native-tokio"] | ||
hyper-rustls-webpki = ["hyper-rustls", "hyper-rustls/webpki-tokio"] | ||
[features] | ||
default = ["default-tls"] | ||
|
||
[dependencies] | ||
stripe_types = { path = "../stripe_types" } | ||
stripe_shared = { path = "../generated/stripe_shared" } | ||
async-std = { version = "1.8,<1.11", optional = true } | ||
default-tls = ["dep:hyper-tls"] | ||
native-tls = ["default-tls"] | ||
rustls-tls-webpki-roots = ["__rustls", "hyper-rustls/webpki-tokio"] | ||
rustls-tls-native = ["__rustls", "hyper-rustls/native-tokio"] | ||
__rustls = ["dep:hyper-rustls"] | ||
|
||
thiserror = "1.0.24" | ||
hyper = { version = "0.14", default-features = false, features = ["http1", "http2", "client", "tcp"], optional = true } | ||
hyper-tls = { version = "0.5", optional = true } | ||
hyper-rustls = { version = "0.24", default-features = false, features = ["http1", "http2", "tls12", "logging"], optional = true } | ||
serde_qs = "0.12.0" | ||
surf = { version = "2.1", optional = true } | ||
tokio = { version = "1.2", optional = true } | ||
uuid = { version = "1.6.1", optional = true, features = ["v4"] } | ||
blocking = [] | ||
uuid = ["stripe_client_core/uuid"] | ||
|
||
[dev-dependencies] | ||
serde.workspace = true | ||
serde_json.workspace = true | ||
http-types.workspace = true | ||
smol_str.workspace = true | ||
miniserde.workspace = true | ||
httpmock = { version = "0.7.0", default-features = false } | ||
|
||
# stream for lists | ||
futures-util = { version = "0.3.21", optional = true } | ||
|
||
[dev-dependencies] | ||
httpmock = "0.6.7" | ||
async-std = { version = "1.10.0", features = ["attributes"] } | ||
tokio = { version = "1.24.1", features = ["rt", "macros"] } |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.