-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add OssUrl * move files * doc * change rfc * change README * chore(version): version number update * refactor: 抽象授权逻辑 * feat: 获取文件列表支持快捷翻页 * feat: add bucket in client struct * feat: add const in ObjectQuery * feat: remove unused method * feat: enhance insert_next_token * feat: export data with custom type * doc: 自定义类型的文档说明 * refactor * chore: CI/CD * chore: CI/CD add publish * chore: add package info
- Loading branch information
Showing
79 changed files
with
1,119 additions
and
21,222 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -25,7 +25,6 @@ jobs: | |
- name: Check fmt | ||
run: cargo fmt --check | ||
|
||
# v0.1.15 目前版本 | ||
- name: Cache | ||
uses: Swatinem/rust-cache@v1 | ||
with: | ||
|
@@ -38,85 +37,13 @@ jobs: | |
if: steps.cache-publish-action.outputs.cache-hit != 'true' | ||
run: | | ||
cargo install publish-action --version=0.3.5 | ||
- name: Run Test | ||
run: | | ||
cargo test --lib -- tests | ||
cargo test --lib --no-default-features -- tests | ||
# --all-features, exclude env_test features | ||
cargo test --lib --features="blocking,sts,put_file,core,auth,decode" -- tests | ||
cargo test --lib --features blocking --no-default-features tests | ||
cargo test --lib --features blocking tests | ||
cargo test --lib --features sts --no-default-features tests | ||
cargo test --lib --features put_file --no-default-features tests | ||
cargo test --lib --features core --no-default-features tests | ||
cargo test --lib --features auth --no-default-features tests | ||
cargo test --lib --features decode --no-default-features tests | ||
cargo test --lib --jobs 1 --features env_test tests::env::client_from_env | ||
cargo test --lib --jobs 1 --features env_test tests::env::config_from_env | ||
cargo test --lib --jobs 1 --features env_test tests::env::bucket_base_from_env | ||
cargo test --lib --jobs 1 --features env_test tests::env::end_point_from_env | ||
# --all-features, exclude bench features | ||
cargo test --doc --all-features | ||
cd oss_derive | ||
cargo test | ||
cargo test --features blocking | ||
cargo test --doc | ||
- name: Run publish-action of derive | ||
run: publish-action --dir="/oss_derive/" --tag-prefix="derive_" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | ||
|
||
- name: Run publish-action of oss | ||
run: publish-action --dir="/" --tag-prefix="v" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | ||
|
||
|
||
|
||
grcov: | ||
name: Coverage and Grcov | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2023-03-26 | ||
override: true | ||
|
||
- name: Cache | ||
uses: Swatinem/rust-cache@v1 | ||
with: | ||
key: ${{ runner.os }}-coverage-v0.2.0 | ||
|
||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --all-features --lib | ||
env: | ||
CARGO_INCREMENTAL: '0' | ||
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
|
||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --all-features --doc | ||
env: | ||
CARGO_INCREMENTAL: '0' | ||
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
- name: Gather coverage data | ||
id: coverage | ||
uses: actions-rs/[email protected] | ||
|
||
- name: Coveralls upload | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
path-to-lcov: ${{ steps.coverage.outputs.report }} | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |
This file was deleted.
Oops, something went wrong.
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,119 +1,30 @@ | ||
[package] | ||
name = "aliyun-oss-client" | ||
version.workspace = true | ||
edition.workspace = true | ||
version = "0.13.0-alpha" | ||
edition = "2021" | ||
resolver = "2" | ||
license.workspace = true | ||
documentation.workspace = true | ||
description = "an aliyun oss client" | ||
keywords = ["aliyun", "oss", "sdk"] | ||
categories = ["api-bindings"] | ||
repository.workspace = true | ||
rust-version = "1.62" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[package.metadata.docs.rs] | ||
all-features = true | ||
|
||
[workspace] | ||
members = ["oss_derive"] | ||
|
||
[workspace.package] | ||
version = "0.12.10" | ||
edition = "2021" | ||
license = "MIT" | ||
repository = "https://github.com/tu6ge/oss-rs" | ||
documentation = "https://docs.rs/aliyun-oss-client" | ||
categories = ["api-bindings"] | ||
|
||
[dependencies.oss_derive] | ||
version = "0.10.0" | ||
path = "./oss_derive" | ||
optional = true | ||
|
||
[[example]] | ||
name = "bucket" | ||
required-features = ["blocking"] | ||
|
||
[[example]] | ||
name = "buckets" | ||
required-features = ["blocking"] | ||
|
||
[[example]] | ||
name = "delete_file" | ||
required-features = ["blocking"] | ||
|
||
[[example]] | ||
name = "objects" | ||
required-features = ["blocking"] | ||
|
||
[[example]] | ||
name = "put_file" | ||
required-features = ["blocking", "put_file"] | ||
|
||
[[example]] | ||
name = "io_write" | ||
|
||
[[sts]] | ||
name = "sts" | ||
required-features = ["sts"] | ||
|
||
[features] | ||
default = [ | ||
#"blocking", | ||
"core", | ||
"sts", | ||
"put_file", | ||
] | ||
core = [ | ||
"reqwest", | ||
"async-trait", | ||
"futures", | ||
"futures-core", | ||
"async-stream", | ||
"thiserror", | ||
"oss_derive", | ||
"auth", | ||
"decode", | ||
] | ||
blocking = ["core", "reqwest/blocking"] | ||
sts = ["core", "auth"] | ||
put_file = ["core", "infer"] | ||
auth = ["reqwest", "percent-encoding"] | ||
decode = ["quick-xml", "oss_derive"] | ||
env_test = [] | ||
# bench = [] | ||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
async-stream = {version = "^0.3", optional = true} | ||
async-trait = {version = "^0.1", optional = true} | ||
base64 = {version = "^0.21"} | ||
chrono = {version = "^0.4"} | ||
futures = {version = "^0.3", optional = true} | ||
futures-core = {version = "^0.3", optional = true} | ||
hmac = {version = "^0.12"} | ||
http= {version = "^0.2"} | ||
infer = {version = "^0.14", optional = true} | ||
percent-encoding = {version = "2.2.0", optional = true} | ||
quick-xml = {version = "^0.29", optional = true} | ||
reqwest = {version ="^0.11", optional = true} | ||
base64 = {version = "^0.22"} | ||
chrono = {version = "^0.4"} | ||
sha1 = {version = "^0.10"} | ||
thiserror = {version = "^1", optional = true} | ||
url= {version = "^2"} | ||
reqwest = {version ="^0.12"} | ||
thiserror = {version = "^1"} | ||
serde = {version = "1.0", features = ["derive"] } | ||
serde-xml-rs = "0.6.0" | ||
|
||
[dev-dependencies] | ||
assert_matches = "1.5.0" | ||
chrono = {version = "^0.4"} | ||
dotenv = "0.15.0" | ||
futures = {version = "^0.3"} | ||
http= {version = "^0.2"} | ||
mockall = "0.11.2" | ||
mockall_double= "0.3.0" | ||
thiserror = {version = "^1"} | ||
tokio = { version = "1.19.2", features = ["rt","macros","rt-multi-thread"] } | ||
url = { version = "^2" } | ||
serde = { version = "1.0", features = ["derive"] } | ||
reqwest = { version ="^0.11", features = ["json"] } | ||
|
||
# [build-dependencies] | ||
# rustc_version = "0.4.0" | ||
|
Oops, something went wrong.