Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add CI action #6

Merged
merged 13 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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 }}:[email protected]/".insteadOf "[email protected]:"
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
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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://[email protected]/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"