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