From 49d36a5f518cde26b62e697311fb6554dc7fe190 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 31 Jul 2024 15:29:15 -0400 Subject: [PATCH] Try 3 --- .woodpecker.yml | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index fd0c88067..b2befc98b 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -7,10 +7,13 @@ variables: - &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_diesel_cli: &install_diesel_cli - - apt-get update && apt-get install -y lsb-release build-essential - - 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 + - apt-get update && apt-get install -y postgresql-common + # - apt-get update && apt-get install -y lsb-release build-essential ca-certificates + - /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh + # - 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 - export PATH="$CARGO_HOME/bin:$PATH" - &slow_check_paths @@ -44,6 +47,18 @@ 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_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: image: tmknom/prettier:3.0.0 commands: @@ -130,18 +145,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_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: image: *rust_image environment: