mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-26 06:11:26 +00:00
Try 3
This commit is contained in:
parent
5f6cedbcca
commit
49d36a5f51
1 changed files with 19 additions and 16 deletions
|
@ -7,10 +7,13 @@ variables:
|
||||||
- &install_pnpm "corepack enable pnpm"
|
- &install_pnpm "corepack enable pnpm"
|
||||||
- &install_binstall "wget -O- https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz | tar -xvz -C /usr/local/cargo/bin"
|
- &install_binstall "wget -O- https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz | tar -xvz -C /usr/local/cargo/bin"
|
||||||
- install_diesel_cli: &install_diesel_cli
|
- install_diesel_cli: &install_diesel_cli
|
||||||
- apt-get update && apt-get install -y lsb-release build-essential
|
- apt-get update && apt-get install -y postgresql-common
|
||||||
- sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
|
# - apt-get update && apt-get install -y lsb-release build-essential ca-certificates
|
||||||
- curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc|gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg
|
- /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
|
||||||
- apt-get update && apt-get install -y postgresql-client-16
|
# - sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
|
||||||
|
# - curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc|gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg
|
||||||
|
# - apt-get update
|
||||||
|
# - apt-get install -y postgresql-client-16
|
||||||
- cargo install diesel_cli --no-default-features --features postgres
|
- cargo install diesel_cli --no-default-features --features postgres
|
||||||
- export PATH="$CARGO_HOME/bin:$PATH"
|
- export PATH="$CARGO_HOME/bin:$PATH"
|
||||||
- &slow_check_paths
|
- &slow_check_paths
|
||||||
|
@ -44,6 +47,18 @@ 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:
|
||||||
|
@ -130,18 +145,6 @@ 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