feat: setup check and test for forge/* workspaces
This commit is contained in:
parent
aefc691033
commit
38d897023c
3 changed files with 41 additions and 2 deletions
24
Cargo.lock
generated
24
Cargo.lock
generated
|
@ -563,6 +563,14 @@ version = "0.1.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
|
||||
|
||||
[[package]]
|
||||
name = "forge-core"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"db-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "form_urlencoded"
|
||||
version = "1.0.1"
|
||||
|
@ -673,6 +681,19 @@ dependencies = [
|
|||
"wasi 0.10.2+wasi-snapshot-preview1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gitea"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"actix-rt",
|
||||
"async-trait",
|
||||
"forge-core",
|
||||
"reqwest",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "globset"
|
||||
version = "0.4.8"
|
||||
|
@ -2127,10 +2148,13 @@ name = "starchart"
|
|||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"actix-rt",
|
||||
"async-trait",
|
||||
"config",
|
||||
"db-core",
|
||||
"db-sqlx-sqlite",
|
||||
"derive_more",
|
||||
"forge-core",
|
||||
"gitea",
|
||||
"lazy_static",
|
||||
"log",
|
||||
"rand",
|
||||
|
|
11
Cargo.toml
11
Cargo.toml
|
@ -11,6 +11,7 @@ build = "build.rs"
|
|||
|
||||
[dependencies]
|
||||
actix-rt = "2.7"
|
||||
async-trait = "0.1.51"
|
||||
config = "0.13.0"
|
||||
lazy_static = "1.4.0"
|
||||
rand = "0.8.5"
|
||||
|
@ -45,11 +46,17 @@ path = "./db/db-core"
|
|||
[dependencies.db-sqlx-sqlite]
|
||||
path = "./db/db-sqlx-sqlite"
|
||||
|
||||
|
||||
[dependencies.gitea]
|
||||
path = "./forge/gitea"
|
||||
|
||||
[dependencies.forge-core]
|
||||
path = "./forge/forge-core"
|
||||
|
||||
[dependencies.sqlx]
|
||||
features = ["runtime-actix-rustls", "uuid", "postgres", "time", "offline", "sqlite"]
|
||||
version = "0.5.11"
|
||||
|
||||
[workspace]
|
||||
exclude = ["db/migrator"]
|
||||
members = [".", "db/db-core", "db/db-sqlx-sqlite"]
|
||||
# "db/db-sqlx-postgres"
|
||||
members = [".", "db/db-core", "db/db-sqlx-sqlite", "forge/forge-core", "forge/gitea"]
|
||||
|
|
8
Makefile
8
Makefile
|
@ -9,6 +9,11 @@ define test_sqlite_db
|
|||
cargo test --no-fail-fast
|
||||
endef
|
||||
|
||||
define test_gitea_forge
|
||||
cd forge/gitea && \
|
||||
cargo test --no-fail-fast
|
||||
endef
|
||||
|
||||
default: ## Debug build
|
||||
cargo build
|
||||
|
||||
|
@ -25,6 +30,8 @@ coverage: migrate ## Generate coverage report in HTML format
|
|||
check: ## Check for syntax errors on all workspaces
|
||||
cargo check --workspace --tests --all-features
|
||||
cd db/migrator && cargo check --tests --all-features
|
||||
cd forge/forge-core && cargo check --tests --all-features
|
||||
cd forge/gitea && cargo check --tests --all-features
|
||||
cd db/db-sqlx-sqlite &&\
|
||||
DATABASE_URL=${SQLITE_DATABASE_URL}\
|
||||
cargo check
|
||||
|
@ -67,6 +74,7 @@ sqlx-offline-data: ## prepare sqlx offline data
|
|||
test: migrate ## Run tests
|
||||
$(call launch_test_env)
|
||||
$(call test_sqlite_db)
|
||||
$(call test_gitea_forge)
|
||||
cargo test --no-fail-fast
|
||||
|
||||
# cd database/db-sqlx-postgres &&\
|
||||
|
|
Loading…
Reference in a new issue