mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-30 00:01:25 +00:00
Extract taplo into its own image, ignore binstall.
This commit is contained in:
parent
5dad74b732
commit
ae8c062f69
1 changed files with 18 additions and 15 deletions
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
- &rust_image "rust:1.77"
|
- &rust_image "rust:1.77"
|
||||||
|
- &rust_nightly_image "rustlang/rust:nightly"
|
||||||
- &install_pnpm "corepack enable pnpm"
|
- &install_pnpm "corepack enable pnpm"
|
||||||
- &slow_check_paths
|
- &slow_check_paths
|
||||||
- event: pull_request
|
- event: pull_request
|
||||||
|
@ -46,18 +47,6 @@ steps:
|
||||||
when:
|
when:
|
||||||
- event: [pull_request, tag]
|
- event: [pull_request, tag]
|
||||||
|
|
||||||
check_diesel_schema:
|
|
||||||
image: *rust_image
|
|
||||||
environment:
|
|
||||||
CARGO_HOME: .cargo_home
|
|
||||||
DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
|
|
||||||
commands:
|
|
||||||
- <<: *install_diesel_cli
|
|
||||||
- diesel migration run
|
|
||||||
- diesel print-schema --config-file=diesel.toml > tmp.schema
|
|
||||||
- diff tmp.schema crates/db_schema/src/schema.rs
|
|
||||||
when: *slow_check_paths
|
|
||||||
|
|
||||||
prettier_check:
|
prettier_check:
|
||||||
image: tmknom/prettier:3.0.0
|
image: tmknom/prettier:3.0.0
|
||||||
commands:
|
commands:
|
||||||
|
@ -66,8 +55,10 @@ steps:
|
||||||
- event: pull_request
|
- event: pull_request
|
||||||
|
|
||||||
toml_fmt:
|
toml_fmt:
|
||||||
image: tamasfe/taplo:0.8.1
|
image: *rust_image
|
||||||
commands:
|
commands:
|
||||||
|
- <<: *install_binstall
|
||||||
|
- cargo binstall -y taplo-cli
|
||||||
- taplo format --check
|
- taplo format --check
|
||||||
when:
|
when:
|
||||||
- event: pull_request
|
- event: pull_request
|
||||||
|
@ -80,7 +71,7 @@ steps:
|
||||||
- event: pull_request
|
- event: pull_request
|
||||||
|
|
||||||
cargo_fmt:
|
cargo_fmt:
|
||||||
image: rustlang/rust:nightly
|
image: *rust_nightly_image
|
||||||
environment:
|
environment:
|
||||||
# store cargo data in repo folder so that it gets cached between steps
|
# store cargo data in repo folder so that it gets cached between steps
|
||||||
CARGO_HOME: .cargo_home
|
CARGO_HOME: .cargo_home
|
||||||
|
@ -91,7 +82,7 @@ steps:
|
||||||
- event: pull_request
|
- event: pull_request
|
||||||
|
|
||||||
cargo_machete:
|
cargo_machete:
|
||||||
image: rustlang/rust:nightly
|
image: *rust_nightly_image
|
||||||
commands:
|
commands:
|
||||||
- <<: *install_binstall
|
- <<: *install_binstall
|
||||||
- cargo binstall -y cargo-machete
|
- cargo binstall -y cargo-machete
|
||||||
|
@ -144,6 +135,18 @@ steps:
|
||||||
- diff config/defaults.hjson config/defaults_current.hjson
|
- diff config/defaults.hjson config/defaults_current.hjson
|
||||||
when: *slow_check_paths
|
when: *slow_check_paths
|
||||||
|
|
||||||
|
check_diesel_schema:
|
||||||
|
image: *rust_image
|
||||||
|
environment:
|
||||||
|
CARGO_HOME: .cargo_home
|
||||||
|
DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
|
||||||
|
commands:
|
||||||
|
- <<: *install_diesel_cli
|
||||||
|
- diesel migration run
|
||||||
|
- diesel print-schema --config-file=diesel.toml > tmp.schema
|
||||||
|
- diff tmp.schema crates/db_schema/src/schema.rs
|
||||||
|
when: *slow_check_paths
|
||||||
|
|
||||||
check_db_perf_tool:
|
check_db_perf_tool:
|
||||||
image: *rust_image
|
image: *rust_image
|
||||||
environment:
|
environment:
|
||||||
|
|
Loading…
Reference in a new issue