mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-22 19:01:32 +00:00
Fix startup errors, add ci check (fixes #5209)
This commit is contained in:
parent
8d91543a13
commit
323b154e0b
2 changed files with 30 additions and 19 deletions
|
@ -178,7 +178,18 @@ steps:
|
||||||
CARGO_HOME: .cargo_home
|
CARGO_HOME: .cargo_home
|
||||||
commands:
|
commands:
|
||||||
- cargo build
|
- cargo build
|
||||||
- mv target/debug/lemmy_server target/lemmy_server
|
- cp target/debug/lemmy_server target/lemmy_server
|
||||||
|
when: *slow_check_paths
|
||||||
|
|
||||||
|
startup_errors:
|
||||||
|
image: *rust_image
|
||||||
|
environment:
|
||||||
|
LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
|
||||||
|
CARGO_HOME: .cargo_home
|
||||||
|
commands:
|
||||||
|
- timeout --preserve-status 30 cargo run > lemmy.log 2>&1
|
||||||
|
- cat lemmy.log
|
||||||
|
- "! grep ERROR lemmy.log"
|
||||||
when: *slow_check_paths
|
when: *slow_check_paths
|
||||||
|
|
||||||
check_diesel_migration:
|
check_diesel_migration:
|
||||||
|
|
|
@ -186,26 +186,26 @@ BEGIN
|
||||||
AND pe.bot_account = FALSE
|
AND pe.bot_account = FALSE
|
||||||
UNION
|
UNION
|
||||||
SELECT
|
SELECT
|
||||||
pl.person_id,
|
pa.person_id,
|
||||||
p.community_id
|
p.community_id
|
||||||
FROM
|
FROM
|
||||||
post_like pl
|
post_actions pa
|
||||||
INNER JOIN post p ON pl.post_id = p.id
|
INNER JOIN post p ON pa.post_id = p.id
|
||||||
INNER JOIN person pe ON pl.person_id = pe.id
|
INNER JOIN person pe ON pa.person_id = pe.id
|
||||||
WHERE
|
WHERE
|
||||||
pl.published > ('now'::timestamp - i::interval)
|
pa.liked > ('now'::timestamp - i::interval)
|
||||||
AND pe.bot_account = FALSE
|
AND pe.bot_account = FALSE
|
||||||
UNION
|
UNION
|
||||||
SELECT
|
SELECT
|
||||||
cl.person_id,
|
ca.person_id,
|
||||||
p.community_id
|
p.community_id
|
||||||
FROM
|
FROM
|
||||||
comment_like cl
|
comment_actions ca
|
||||||
INNER JOIN comment c ON cl.comment_id = c.id
|
INNER JOIN comment c ON ca.comment_id = c.id
|
||||||
INNER JOIN post p ON c.post_id = p.id
|
INNER JOIN post p ON c.post_id = p.id
|
||||||
INNER JOIN person pe ON cl.person_id = pe.id
|
INNER JOIN person pe ON ca.person_id = pe.id
|
||||||
WHERE
|
WHERE
|
||||||
cl.published > ('now'::timestamp - i::interval)
|
ca.liked > ('now'::timestamp - i::interval)
|
||||||
AND pe.bot_account = FALSE) a
|
AND pe.bot_account = FALSE) a
|
||||||
GROUP BY
|
GROUP BY
|
||||||
community_id;
|
community_id;
|
||||||
|
@ -244,22 +244,22 @@ BEGIN
|
||||||
AND pe.bot_account = FALSE
|
AND pe.bot_account = FALSE
|
||||||
UNION
|
UNION
|
||||||
SELECT
|
SELECT
|
||||||
pl.person_id
|
pa.person_id
|
||||||
FROM
|
FROM
|
||||||
post_like pl
|
post_actions pa
|
||||||
INNER JOIN person pe ON pl.person_id = pe.id
|
INNER JOIN person pe ON pa.person_id = pe.id
|
||||||
WHERE
|
WHERE
|
||||||
pl.published > ('now'::timestamp - i::interval)
|
pa.liked > ('now'::timestamp - i::interval)
|
||||||
AND pe.local = TRUE
|
AND pe.local = TRUE
|
||||||
AND pe.bot_account = FALSE
|
AND pe.bot_account = FALSE
|
||||||
UNION
|
UNION
|
||||||
SELECT
|
SELECT
|
||||||
cl.person_id
|
ca.person_id
|
||||||
FROM
|
FROM
|
||||||
comment_like cl
|
comment_actions ca
|
||||||
INNER JOIN person pe ON cl.person_id = pe.id
|
INNER JOIN person pe ON ca.person_id = pe.id
|
||||||
WHERE
|
WHERE
|
||||||
cl.published > ('now'::timestamp - i::interval)
|
ca.liked > ('now'::timestamp - i::interval)
|
||||||
AND pe.local = TRUE
|
AND pe.local = TRUE
|
||||||
AND pe.bot_account = FALSE) a;
|
AND pe.bot_account = FALSE) a;
|
||||||
RETURN count_;
|
RETURN count_;
|
||||||
|
|
Loading…
Reference in a new issue