-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(action/config): Update GitHub workflows
- Configure Dependabot for GitHub Actions and Cargo dependencies. - Add a scheduled audit job to run daily using rustsec/audit-check.
- Loading branch information
Showing
6 changed files
with
181 additions
and
58 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
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
name: Docs | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: Install build dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt install -y cmake libclang-dev | ||
- name: Install stable toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Run cargo doc | ||
run: cargo doc --no-deps --all-features |
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
# rust-clippy is a tool that runs a bunch of lints to catch common | ||
# mistakes in your Rust code and help improve your Rust code. | ||
# More details at https://github.com/rust-lang/rust-clippy | ||
# and https://rust-lang.github.io/rust-clippy/ | ||
|
||
name: rust-clippy analyze | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ "main" ] | ||
schedule: | ||
- cron: '25 15 * * 1' | ||
|
||
jobs: | ||
rust-clippy-analyze: | ||
name: Run rust-clippy analyzing | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
security-events: write | ||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: clippy | ||
|
||
- name: Install required cargo | ||
run: cargo install clippy-sarif sarif-fmt | ||
|
||
- name: Run rust-clippy | ||
run: | ||
cargo clippy | ||
--all-features | ||
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt | ||
continue-on-error: true | ||
|
||
- name: Upload analysis results to GitHub | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: rust-clippy-results.sarif | ||
wait-for-processing: true |
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,58 +1,67 @@ | ||
[package] | ||
edition = "2021" | ||
name = "polaris-rust" | ||
version = "0.0.1" | ||
edition = "2021" | ||
version = "0.2.0" | ||
license = "BSD 3-Clause" | ||
authors = ["houseme <[email protected]>", "liaochuntao <[email protected]>"] | ||
repository = "https://github.com/polaris-contrib/polaris-rust" | ||
description = "Lightweight Rust SDK used as Proxyless Service Governance Solution." | ||
homepage = "https://polarismesh.cn" | ||
documentation = "https://docs.rs/polaris-rust" | ||
keywords = ["polaris", "solution", "governance", "server", "proxyless"] | ||
categories = ["config", "asynchronous", "development-tools"] | ||
readme = "README.md" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
[dependencies] | ||
bytes = {version = "1.4.0"} | ||
schemars = {version = "0.8.16"} | ||
serde = {version = "1.0.198", features = ["derive"]} | ||
serde-duration-ext = {version = "0.1.0"} | ||
serde_json = {version = "1.0.116"} | ||
serde_yaml = {version = "0.9.34"} | ||
|
||
uuid = {version = "1.8.0", features = [ | ||
"v4", # Lets you generate random UUIDs | ||
"fast-rng", # Use a faster (but still sufficiently random) RNG | ||
"macro-diagnostics", # Enable better diagnostics for compile-time UUIDs | ||
]} | ||
bytes = { version = "1.4.0" } | ||
schemars = { version = "0.8.16" } | ||
serde = { version = "1.0.198", features = ["derive"] } | ||
serde-duration-ext = { version = "0.1.0" } | ||
serde_json = { version = "1.0.116" } | ||
serde_yaml = { version = "0.9.34" } | ||
|
||
uuid = { version = "1.8.0", features = [ | ||
"v4", # Lets you generate random UUIDs | ||
"fast-rng", # Use a faster (but still sufficiently random) RNG | ||
"macro-diagnostics", # Enable better diagnostics for compile-time UUIDs | ||
] } | ||
|
||
# cache | ||
dashmap = {version = "5.4.0"} | ||
dashmap = { version = "5.4.0" } | ||
|
||
# http | ||
reqwest = {version = "0.12.8", features = ["blocking"]} | ||
reqwest = { version = "0.12.8", features = ["blocking"] } | ||
|
||
# async | ||
async-trait = {version = "0.1"} | ||
http = {version = "0.2.12"} | ||
hyper = {version = "0.14.28", features = ["full"]} | ||
tokio = {version = "1.37.0", features = ["full"]} | ||
tokio-stream = {version = "0.1.16"} | ||
tower = {version = "0.4.13"} | ||
async-trait = { version = "0.1" } | ||
http = { version = "0.2.12" } | ||
hyper = { version = "0.14.28", features = ["full"] } | ||
tokio = { version = "1.37.0", features = ["full"] } | ||
tokio-stream = { version = "0.1.16" } | ||
tower = { version = "0.4.13" } | ||
|
||
# gRPC dep | ||
futures = {version = "0.3.30"} | ||
once_cell = {version = "1.19.0"} | ||
prost = {version = "0.12.4"} | ||
prost-build = {version = "0.12.4"} | ||
prost-types = {version = "0.12.4"} | ||
tonic = {version = "0.11.0"} | ||
futures = { version = "0.3.30" } | ||
once_cell = { version = "1.19.0" } | ||
prost = { version = "0.12.4" } | ||
prost-build = { version = "0.12.4" } | ||
prost-types = { version = "0.12.4" } | ||
tonic = { version = "0.11.0" } | ||
|
||
# logging | ||
tracing = {version = "0.1.36"} | ||
tracing = { version = "0.1.36" } | ||
|
||
# crypto | ||
aes = {version = "0.7.4"} | ||
base64 = {version = "0.22.1"} | ||
block-modes = {version = "0.8.1"} | ||
hex = {version = "0.4.3"} | ||
rand = {version = "0.8.4"} | ||
rsa = {version = "0.9.6"} | ||
aes = { version = "0.7.4" } | ||
base64 = { version = "0.22.1" } | ||
block-modes = { version = "0.8.1" } | ||
hex = { version = "0.4.3" } | ||
rand = { version = "0.8.4" } | ||
rsa = { version = "0.9.6" } | ||
|
||
[dev-dependencies] | ||
tracing-subscriber = {version = "0.3", features = ["default"]} | ||
tracing-subscriber = { version = "0.3", features = ["default"] } | ||
|
||
[[example]] | ||
name = "discover" | ||
|
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