Try sequence merges 1

This commit is contained in:
Dessalines 2024-05-16 11:10:13 -04:00
parent 8f34d977b3
commit 7cb5289064

View File

@ -24,10 +24,10 @@ variables:
"diesel.toml",
".gitmodules",
]
- &install_binstall |
- wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz
- tar -xvf cargo-binstall-x86_64-unknown-linux-musl.tgz
- cp cargo-binstall /usr/local/cargo/bin
- install_binstall: &install_binstall
- wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz
- tar -xvf cargo-binstall-x86_64-unknown-linux-musl.tgz
- cp cargo-binstall /usr/local/cargo/bin
# Broken for cron jobs currently, see
# https://github.com/woodpecker-ci/woodpecker/issues/1716
@ -48,6 +48,20 @@ steps:
when:
- 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_binstall
# Install diesel_cli
- cargo binstall -y diesel_cli -- --no-default-features --features postgres
- 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:
image: tmknom/prettier:3.0.0
commands:
@ -83,7 +97,7 @@ steps:
cargo_machete:
image: rustlang/rust:nightly
commands:
- *install_binstall
- <<: *install_binstall
- cargo binstall -y cargo-machete
- cargo machete
when:
@ -134,20 +148,6 @@ steps:
- diff config/defaults.hjson config/defaults_current.hjson
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_binstall
# Install diesel_cli
- cargo binstall -y diesel_cli -- --no-default-features --features postgres
- 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:
image: *rust_image
environment:
@ -202,7 +202,7 @@ steps:
PGHOST: database
PGDATABASE: lemmy
commands:
- *install_binstall
- <<: *install_binstall
# Install diesel_cli
- cargo binstall -y diesel_cli -- --no-default-features --features postgres
- export PATH="$CARGO_HOME/bin:$PATH"
@ -283,7 +283,7 @@ steps:
publish_to_crates_io:
image: *rust_image
commands:
- *install_binstall
- <<: *install_binstall
# Install cargo-workspaces
- cargo binstall -y cargo-workspaces
- cp -r migrations crates/db_schema/