-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow removing db models in a feature flag
- Loading branch information
1 parent
e1003e8
commit c60424f
Showing
52 changed files
with
4,123 additions
and
208 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 |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: CI-WITHOUT_DB | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
env: | ||
RUST_TOOLCHAIN: stable | ||
TOOLCHAIN_PROFILE: minimal | ||
|
||
jobs: | ||
rustfmt: | ||
name: Check Style | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- name: Checkout the code | ||
uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: ${{ env.TOOLCHAIN_PROFILE }} | ||
toolchain: nightly | ||
override: true | ||
components: rustfmt | ||
- run: cargo fmt --all -- --check | ||
working-directory: ./examples/without-db | ||
|
||
clippy: | ||
name: Run Clippy | ||
needs: [rustfmt] | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- name: Checkout the code | ||
uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: ${{ env.TOOLCHAIN_PROFILE }} | ||
toolchain: ${{ env.RUST_TOOLCHAIN }} | ||
override: true | ||
- name: Setup Rust cache | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Run cargo clippy | ||
run: cargo clippy -- -W clippy::nursery -W clippy::pedantic -W rust-2018-idioms -W rust-2021-compatibility | ||
working-directory: ./examples/without-db | ||
|
||
test: | ||
name: Run Tests | ||
needs: [rustfmt, clippy] | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- name: Checkout the code | ||
uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: ${{ env.TOOLCHAIN_PROFILE }} | ||
toolchain: ${{ env.RUST_TOOLCHAIN }} | ||
override: true | ||
- name: Setup Rust cache | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Run cargo test | ||
run: cargo test | ||
working-directory: ./examples/without-db |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -10,11 +10,12 @@ authors = ["Dotan Nahum <[email protected]>", "Elad Kaplan <[email protected]>"] | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[features] | ||
default = ["auth", "cli"] | ||
default = ["auth", "cli", "with-db"] | ||
|
||
auth = ["dep:jsonwebtoken", "dep:bcrypt"] | ||
cli = ["dep:clap"] | ||
testing = ["dep:axum-test"] | ||
with-db = ["dep:sea-orm", "dep:sea-orm-migration"] | ||
|
||
[dependencies] | ||
|
||
|
@@ -29,10 +30,10 @@ sea-orm = { version = "0.12.4", features = [ | |
"sqlx-mysql", | ||
"runtime-tokio-rustls", | ||
"macros", | ||
] } | ||
], optional = true } | ||
|
||
tokio = { version = "1.33.0", features = ["full"] } | ||
# the rest | ||
sqlx = "0.7.2" | ||
|
||
serde = "1.0.193" | ||
serde_json = "1.0.108" | ||
|
@@ -64,14 +65,6 @@ tracing-subscriber = { version = "0.3.16", features = ["env-filter"] } | |
# cli/migrations | ||
duct = "0.13.6" | ||
|
||
# _meta.rs: schema discovery for truncate | ||
# sea-schema = { version = "*", features = ["runtime-tokio-rustls", "sqlx-all"] } | ||
# sqlx = { version = "0.7.2", default-features = false, features = [ | ||
# "mysql", | ||
# "postgres", | ||
# ] } | ||
# url = "*" | ||
|
||
config = "0.13.3" | ||
tower-http = { version = "0.4.4", features = ["trace", "catch-panic"] } | ||
tower-request-id = "0.2.1" | ||
|
@@ -90,6 +83,7 @@ cargo_metadata = "0.18.1" | |
|
||
|
||
[dependencies.sea-orm-migration] | ||
optional = true | ||
version = "0.12.4" | ||
features = [ | ||
# Enable at least one `ASYNC_RUNTIME` and `DATABASE_DRIVER` feature if you want to run migration via CLI. | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.