You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2023/03/18 05:38:15 UTC
[incubator-opendal] branch main updated: ci: Fix license header check and doc check (#1674)
This is an automated email from the ASF dual-hosted git repository.
xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git
The following commit(s) were added to refs/heads/main by this push:
new d45a9c88 ci: Fix license header check and doc check (#1674)
d45a9c88 is described below
commit d45a9c889a58a66755a65ce59fa3a6d22b079a31
Author: Suyan <su...@gmail.com>
AuthorDate: Sat Mar 18 13:38:11 2023 +0800
ci: Fix license header check and doc check (#1674)
* chore: fix header
Signed-off-by: suyanhanx <su...@gmail.com>
* FIx CI
Signed-off-by: Xuanwo <gi...@xuanwo.io>
* Fix python build
Signed-off-by: Xuanwo <gi...@xuanwo.io>
* msrv only check opendal
Signed-off-by: Xuanwo <gi...@xuanwo.io>
* Fix naming
Signed-off-by: Xuanwo <gi...@xuanwo.io>
---------
Signed-off-by: suyanhanx <su...@gmail.com>
Signed-off-by: Xuanwo <gi...@xuanwo.io>
Co-authored-by: Xuanwo <gi...@xuanwo.io>
---
.github/workflows/bindings_nodejs.yml | 2 +-
.github/workflows/ci.yml | 69 ++++++++++++-----------------------
.taplo.toml | 2 +-
bindings/c/Cargo.toml | 2 +-
bindings/nodejs/Cargo.toml | 1 +
bindings/nodejs/src/lib.rs | 2 +-
bindings/python/Cargo.toml | 1 +
licenserc.toml | 4 +-
8 files changed, 32 insertions(+), 51 deletions(-)
diff --git a/.github/workflows/bindings_nodejs.yml b/.github/workflows/bindings_nodejs.yml
index 05365c81..09e39588 100644
--- a/.github/workflows/bindings_nodejs.yml
+++ b/.github/workflows/bindings_nodejs.yml
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-name: Binding NodeJS CI
+name: Bindings NodeJS CI
env:
DEBUG: napi:*
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 7bf9a383..aa00cf5f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -52,12 +52,6 @@ jobs:
distribution: temurin
java-version: "11"
- # Wait for https://github.com/apache/incubator-opendal/issues/1457
- # - name: Setup-hdfs env
- # uses: beyondstorage/setup-hdfs@master
- # with:
- # hdfs-version: "3.3.2"
-
- name: Setup Rust toolchain
uses: ./.github/actions/setup
@@ -67,11 +61,9 @@ jobs:
- name: Cargo format
run: cargo fmt --all -- --check
- name: Cargo clippy
- # run: cargo clippy --all-targets --all-features --workspace -- -D warnings
- run: cargo clippy --all-targets --workspace -- -D warnings
+ run: cargo clippy --all-targets --all-features --workspace -- -D warnings
- name: Cargo doc
- # run: cargo doc --lib --no-deps --all-features
- run: cargo doc --lib --no-deps
+ run: cargo doc --lib --no-deps --all-features -p opendal
msrv_check:
runs-on: ubuntu-latest
@@ -80,21 +72,12 @@ jobs:
OPENDAL_MSRV: "1.60"
steps:
- uses: actions/checkout@v3
- - name: Checkout python env
- uses: actions/setup-python@v4
- with:
- python-version: "3.8"
- - name: Checkout java env
- uses: actions/setup-java@v3
- with:
- distribution: temurin
- java-version: "11"
- name: Setup msrv of rust
run: |
rustup toolchain install ${OPENDAL_MSRV}
rustup component add clippy --toolchain ${OPENDAL_MSRV}
- name: Check
- run: cargo +${OPENDAL_MSRV} clippy --no-deps --all-targets -- -D warnings
+ run: cargo +${OPENDAL_MSRV} clippy -p opendal --no-deps -- -D warnings
build:
runs-on: ${{ matrix.os }}
@@ -111,32 +94,28 @@ jobs:
- name: Build
run: cargo build -p opendal -p oli -p object_store_opendal
- # build_all_features:
- # runs-on: ${{ matrix.os }}
- # strategy:
- # matrix:
- # os:
- # - ubuntu-latest
- # steps:
- # - uses: actions/checkout@v3
- # - name: Checkout python env
- # uses: actions/setup-python@v4
- # with:
- # python-version: "3.8"
- # - name: Checkout java env
- # uses: actions/setup-java@v3
- # with:
- # distribution: temurin
- # java-version: "11"
- # - name: Setup-hdfs env
- # uses: beyondstorage/setup-hdfs@master
- # with:
- # hdfs-version: "3.3.2"
+ build_all_features:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ os:
+ - ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - name: Checkout python env
+ uses: actions/setup-python@v4
+ with:
+ python-version: "3.8"
+ - name: Checkout java env
+ uses: actions/setup-java@v3
+ with:
+ distribution: temurin
+ java-version: "11"
- # - name: Setup Rust toolchain
- # uses: ./.github/actions/setup
- # - name: Build
- # run: cargo build --all-features
+ - name: Setup Rust toolchain
+ uses: ./.github/actions/setup
+ - name: Build
+ run: cargo build --all-features
unit:
runs-on: ubuntu-latest
diff --git a/.taplo.toml b/.taplo.toml
index 7c65b90c..583da20d 100644
--- a/.taplo.toml
+++ b/.taplo.toml
@@ -25,6 +25,6 @@ trailing_newline = true
# Alphabetically reorder keys that are not separated by empty lines.
reorder_keys = true
# Maximum amount of allowed consecutive blank lines. This does not affect the whitespace at the end of the document, as it is always stripped.
-allowed_blank_lines = 2
+allowed_blank_lines = 1
# Use CRLF for line endings.
crlf = false
diff --git a/bindings/c/Cargo.toml b/bindings/c/Cargo.toml
index 44285f6e..fdb3f80c 100644
--- a/bindings/c/Cargo.toml
+++ b/bindings/c/Cargo.toml
@@ -27,7 +27,7 @@ version = "0.1.0"
[lib]
crate-type = ["cdylib"]
-name = "opendal"
+doc = false
[dependencies]
opendal = { version = "0.30", path = "../../core" }
diff --git a/bindings/nodejs/Cargo.toml b/bindings/nodejs/Cargo.toml
index 9f523cf1..e127f185 100644
--- a/bindings/nodejs/Cargo.toml
+++ b/bindings/nodejs/Cargo.toml
@@ -27,6 +27,7 @@ version = "0.30.3"
[lib]
crate-type = ["cdylib"]
+doc = false
[dependencies]
futures = "0.3.26"
diff --git a/bindings/nodejs/src/lib.rs b/bindings/nodejs/src/lib.rs
index 3a84c4d0..7748d3a1 100644
--- a/bindings/nodejs/src/lib.rs
+++ b/bindings/nodejs/src/lib.rs
@@ -304,7 +304,7 @@ pub struct BlockingLister(opendal::BlockingLister);
/// Method `next` can be confused for the standard trait method `std::iter::Iterator::next`.
/// But in JavaScript, it is also customary to use the next method directly to obtain the next element.
/// Therefore, disable this clippy. It can be removed after a complete implementation of Generator.
-/// FYI: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator
+/// FYI: <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator>
#[napi]
#[allow(clippy::should_implement_trait)]
impl BlockingLister {
diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml
index 418afc05..9b57b252 100644
--- a/bindings/python/Cargo.toml
+++ b/bindings/python/Cargo.toml
@@ -27,6 +27,7 @@ version = "0.30.3"
[lib]
crate-type = ["cdylib"]
+doc = false
name = "opendal"
[dependencies]
diff --git a/licenserc.toml b/licenserc.toml
index befcb436..fee37991 100644
--- a/licenserc.toml
+++ b/licenserc.toml
@@ -46,8 +46,8 @@ excludes = [
".env",
# ascii is licensed under MIT from memcache-async
- "src/services/memcached/MIT-ascii.txt",
- "src/services/memcached/ascii.rs",
+ "core/src/services/memcached/MIT-ascii.txt",
+ "core/src/services/memcached/ascii.rs",
]
[properties]