-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: updates * build: use just * fixes * doc * fix: GH workflow
- Loading branch information
1 parent
39b7937
commit 840c38d
Showing
11 changed files
with
135 additions
and
94 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,48 @@ | ||
name: CI | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
branches: | ||
- main | ||
tags-ignore: | ||
- v* | ||
|
||
pull_request: | ||
branches: [main] | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v3 | ||
|
||
# Nightly needed for `cargo +nightly fmt` below | ||
- name: Install Rust toolchain | ||
run: | | ||
rustup update | ||
rustup toolchain install nightly | ||
rustup toolchain install nightly --profile minimal | ||
rustup component add rustfmt --toolchain nightly | ||
rustup component add clippy --toolchain nightly | ||
# rustup component add clippy --toolchain nightly | ||
- name: Set up cargo cache | ||
uses: actions/cache@v3 | ||
continue-on-error: false | ||
- name: Install just | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: ${{ runner.os }}-cargo- | ||
|
||
- name: Check code format (cargo fmt) | ||
run: cargo +nightly fmt --check | ||
|
||
- name: Lint (cargo clippy) | ||
run: cargo clippy --no-deps -- -D warnings | ||
|
||
- name: Test (cargo test) | ||
tool: just | ||
|
||
- name: Set up Rust cache | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Check code format | ||
run: just fmt_check | ||
|
||
- name: Run linter | ||
run: just lint | ||
|
||
- name: Run tests | ||
env: | ||
GCP_SERVICE_ACCOUNT: ${{ secrets.GCP_SERVICE_ACCOUNT }} | ||
run: | | ||
printenv GCP_SERVICE_ACCOUNT > pub-sub-client-tests/secrets/active-road-365118-2eca6b7b8fd9.json | ||
cargo test | ||
just test |
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,5 +1,10 @@ | ||
[workspace] | ||
members = [ "pub-sub-client", "pub-sub-client-derive", "pub-sub-client-tests" ] | ||
members = [ | ||
"pub-sub-client", | ||
"pub-sub-client-derive", | ||
"pub-sub-client-tests", | ||
] | ||
resolver = "2" | ||
|
||
[workspace.package] | ||
# No use to define version here, because cargo release ignores it! | ||
|
@@ -8,21 +13,27 @@ edition = "2021" | |
description = "Google Cloud Pub/Sub client library" | ||
authors = [ "Heiko Seeberger <[email protected]>" ] | ||
license = "Apache-2.0" | ||
readme = "README.md" | ||
homepage = "https://github.com/hseeberger/pub-sub-client" | ||
repository = "https://github.com/hseeberger/pub-sub-client" | ||
documentation = "https://github.com/hseeberger/pub-sub-client" | ||
publish = true | ||
|
||
[workspace.dependencies] | ||
anyhow = "1.0" | ||
base64 = "0.13" | ||
goauth = "0.13" | ||
reqwest = { version = "0.11" } | ||
serde = { version = "1.0" } | ||
serde_json = "1.0" | ||
smpl_jwt = "0.7" | ||
thiserror = "1.0" | ||
time = { version = "0.3" } | ||
tracing = "0.1" | ||
testcontainers = "0.14" | ||
tokio = "1.21" | ||
tracing-subscriber = "0.3" | ||
anyhow = { version = "1.0" } | ||
base64 = { version = "0.21" } | ||
goauth = { version = "0.13" } | ||
proc-macro2 = { version = "1.0" } | ||
quote = { version = "1.0" } | ||
reqwest = { version = "0.11" } | ||
serde = { version = "1.0" } | ||
serde_json = { version = "1.0" } | ||
smpl_jwt = { version = "0.7" } | ||
syn = { version = "2.0" } | ||
testcontainers = { version = "0.15" } | ||
testcontainers-modules = { version = "0.1", features = [ "google_cloud_sdk_emulators" ] } | ||
thiserror = { version = "1.0" } | ||
time = { version = "0.3" } | ||
tokio = { version = "1" } | ||
tracing = { version = "0.1" } | ||
tracing-subscriber = { version = "0.3" } |
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,18 @@ | ||
set shell := ["bash", "-uc"] | ||
|
||
check: | ||
cargo check --tests | ||
|
||
fmt: | ||
cargo +nightly fmt | ||
|
||
fmt_check: | ||
cargo +nightly fmt --check | ||
|
||
lint: | ||
cargo clippy --no-deps -- -D warnings | ||
|
||
test: | ||
cargo test | ||
|
||
all: fmt check lint test |
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,19 +1,20 @@ | ||
[package] | ||
name = "pub-sub-client-derive" | ||
version= "0.11.1-alpha.0" | ||
edition.workspace = true | ||
description.workspace = true | ||
authors.workspace = true | ||
license.workspace = true | ||
readme.workspace = true | ||
homepage.workspace = true | ||
repository.workspace = true | ||
documentation.workspace = true | ||
name = "pub-sub-client-derive" | ||
version = "0.11.1-alpha.0" | ||
description = { workspace = true } | ||
edition = { workspace = true } | ||
authors = { workspace = true } | ||
license = { workspace = true } | ||
readme = { workspace = true } | ||
homepage = { workspace = true } | ||
repository = { workspace = true } | ||
documentation = { workspace = true } | ||
publish = { workspace = true } | ||
|
||
[lib] | ||
proc-macro = true | ||
|
||
[dependencies] | ||
proc-macro2 = "1.0" | ||
quote = "1.0" | ||
syn = "1.0" | ||
proc-macro2 = { workspace = true } | ||
quote = { workspace = true } | ||
syn = { workspace = 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,23 +1,24 @@ | ||
[package] | ||
name = "pub-sub-client-tests" | ||
version= "0.11.1-alpha.0" | ||
edition.workspace = true | ||
description.workspace = true | ||
authors.workspace = true | ||
license.workspace = true | ||
readme.workspace = true | ||
homepage.workspace = true | ||
repository.workspace = true | ||
documentation.workspace = true | ||
publish = false | ||
name = "pub-sub-client-tests" | ||
version = "0.11.1-alpha.0" | ||
description = { workspace = true } | ||
edition = { workspace = true } | ||
authors = { workspace = true } | ||
license = { workspace = true } | ||
readme = { workspace = true } | ||
homepage = { workspace = true } | ||
repository = { workspace = true } | ||
documentation = { workspace = true } | ||
publish = false | ||
|
||
[dev-dependencies] | ||
pub-sub-client = { version = "=0.11.1-alpha.0", path = "../pub-sub-client", features = [ "derive" ] } | ||
anyhow = { workspace = true } | ||
base64 = { workspace = true } | ||
reqwest = { workspace = true, features = [ "json" ] } | ||
serde = { workspace = true, features = [ "derive" ] } | ||
serde_json = { workspace = true } | ||
testcontainers = { workspace = true } | ||
tokio = { workspace = true, features = [ "full" ] } | ||
tracing-subscriber = { workspace = true, features = [ "env-filter", "fmt", "json", "tracing-log" ] } | ||
pub-sub-client = { version = "=0.11.1-alpha.0", path = "../pub-sub-client", features = [ "derive" ] } | ||
anyhow = { workspace = true } | ||
base64 = { workspace = true } | ||
reqwest = { workspace = true, features = [ "json" ] } | ||
serde = { workspace = true, features = [ "derive" ] } | ||
serde_json = { workspace = true } | ||
testcontainers = { workspace = true } | ||
testcontainers-modules = { workspace = true } | ||
tokio = { workspace = true, features = [ "full" ] } | ||
tracing-subscriber = { workspace = true, features = [ "env-filter", "fmt", "json", "tracing-log" ] } |
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
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