diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7f1043a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,60 @@ +name: CI +permissions: + contents: read +on: + pull_request: + push: + branches: + - main +env: + RUST_BACKTRACE: 1 + CARGO_TERM_COLOR: always + CLICOLOR: 1 + CARGO_INCREMENTAL: 0 + CARGO_NET_GIT_FETCH_WITH_CLI: true +concurrency: + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true +jobs: + ci: + permissions: + contents: none + name: CI + needs: lint + runs-on: ubuntu-latest + if: always() + steps: + - name: Failed + run: exit 1 + if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') + + lint: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v4 + - name: install rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + components: rustfmt, clippy + - name: install protoc + uses: arduino/setup-protoc@v3 + - run: | + git config --global --add url."https://${{ secrets.GH_TOKEN }}:x-oauth-basic@github.com/".insteadOf "git@github.com:" + git config --global --add url."https://${{ secrets.GH_TOKEN }}:x-oauth-basic@github".insteadOf https://github + git config --global --add url."https://${{ secrets.GH_TOKEN }}:x-oauth-basic@github".insteadOf ssh://git@github + - uses: Swatinem/rust-cache@v2 + - name: Install cargo-sort + uses: baptiste0928/cargo-install@v3 + with: + crate: cargo-sort + version: "^1.0" + - name: Check documentation + env: + RUSTDOCFLAGS: -D warnings + run: cargo doc --workspace --all-features --no-deps --document-private-items + - name: Check formatting + run: cargo fmt --all -- --check + - name: Check Cargo.toml sorting + run: cargo sort --workspace --check diff --git a/Cargo.lock b/Cargo.lock index fa64bec..7b39beb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" @@ -1671,7 +1671,7 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "streamstore" version = "0.1.0" -source = "git+ssh://git@github.com/s2-streamstore/s2-sdk-rust.git?branch=main#548c2316a2d958d16cd5ec516521f251045a54a0" +source = "git+https://github.com/s2-streamstore/s2-sdk-rust.git?branch=main#326610dfd4229a8d66c4429ec7820c8f83636290" dependencies = [ "backon", "bytesize", @@ -1733,7 +1733,7 @@ dependencies = [ [[package]] name = "sync_docs" version = "0.1.0" -source = "git+ssh://git@github.com/s2-streamstore/s2-sdk-rust.git?branch=main#548c2316a2d958d16cd5ec516521f251045a54a0" +source = "git+https://github.com/s2-streamstore/s2-sdk-rust.git?branch=main#326610dfd4229a8d66c4429ec7820c8f83636290" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 779435e..301540e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,22 +4,22 @@ version = "0.1.0" edition = "2021" [dependencies] -pin-project-lite = "0.2" +async-stream = "0.3.6" clap = { version = "4.5.20", features = ["derive"] } +color-print = "0.3.6" colored = "2.1.0" config = "0.14.1" dirs = "5.0.1" +humantime = "2.1.0" +miette = { version = "7.2.0", features = ["fancy"] } +pin-project-lite = "0.2" +pin-utils = "0.1.0" serde = { version = "1.0.214", features = ["derive"] } +serde_json = "1.0.132" +streamstore = { git = "https://github.com/s2-streamstore/s2-sdk-rust.git", branch = "main" } thiserror = "1.0.67" -toml = "0.8.19" -streamstore = { git = "ssh://git@github.com/s2-streamstore/s2-sdk-rust.git", branch = "main" } tokio = { version = "*", features = ["full"] } -humantime = "2.1.0" -miette = { version = "7.2.0", features = ["fancy"] } -color-print = "0.3.6" +tokio-stream = { version = "0.1.16", features = ["io-util"] } +toml = "0.8.19" tracing = "0.1.40" tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } -serde_json = "1.0.132" -tokio-stream = { version = "0.1.16", features = ["io-util"] } -async-stream = "0.3.6" -pin-utils = "0.1.0"