mirror of
https://github.com/LemmyNet/lemmy
synced 2024-11-23 04:53:06 +00:00
set DATABASE_URL, run diesel migration, separate steps
This commit is contained in:
parent
2d88dfdaef
commit
a2cd1ff367
1 changed files with 31 additions and 9 deletions
40
.drone.yml
40
.drone.yml
|
@ -2,23 +2,45 @@ kind: pipeline
|
||||||
name: default
|
name: default
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: cargo test
|
- name: install deps
|
||||||
# needed because it doesnt work as root, and drone clones as root without an easy way to change it
|
# we need to use this experimental image because the normal rust-musl-builder doesnt
|
||||||
|
# allow building as root (and drone doesnt have an easy way to git clone as non-root)
|
||||||
# https://github.com/emk/rust-musl-builder/issues/96
|
# https://github.com/emk/rust-musl-builder/issues/96
|
||||||
|
image: ekidd/rust-musl-builder:experimental-stable
|
||||||
|
user: root
|
||||||
|
commands:
|
||||||
|
- apt-get -y update
|
||||||
|
- apt-get -y install --no-install-recommends espeak postgresql-client
|
||||||
|
|
||||||
|
- name: cargo check
|
||||||
|
image: ekidd/rust-musl-builder:experimental-stable
|
||||||
|
user: root
|
||||||
|
commands:
|
||||||
|
- cargo check --all
|
||||||
|
|
||||||
|
- name: cargo clippy
|
||||||
|
image: ekidd/rust-musl-builder:experimental-stable
|
||||||
|
user: root
|
||||||
|
commands:
|
||||||
|
- cargo clippy
|
||||||
|
|
||||||
|
- name: check documentation build
|
||||||
|
image: ekidd/rust-musl-builder:experimental-stable
|
||||||
|
user: root
|
||||||
|
commands:
|
||||||
|
- mdbook build docs/
|
||||||
|
|
||||||
|
- name: cargo test
|
||||||
image: ekidd/rust-musl-builder:experimental-stable
|
image: ekidd/rust-musl-builder:experimental-stable
|
||||||
user: root
|
user: root
|
||||||
environment:
|
environment:
|
||||||
LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
|
LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
|
||||||
|
DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
|
||||||
RUST_BACKTRACE: 1
|
RUST_BACKTRACE: 1
|
||||||
RUST_TEST_THREADS: 1
|
RUST_TEST_THREADS: 1
|
||||||
commands:
|
commands:
|
||||||
- apt-get -y update
|
- diesel migration run
|
||||||
- apt-get -y install --no-install-recommends espeak postgresql-client
|
- cargo test --workspace --no-fail-fast
|
||||||
- psql $LEMMY_DATABASE_URL -c "\l"
|
|
||||||
#- cargo check --all
|
|
||||||
#- cargo clippy
|
|
||||||
#- cargo test --workspace --no-fail-fast
|
|
||||||
#- mdbook build docs/
|
|
||||||
|
|
||||||
- name: run federation tests
|
- name: run federation tests
|
||||||
image: docker/compose:alpine-1.27.4
|
image: docker/compose:alpine-1.27.4
|
||||||
|
|
Loading…
Reference in a new issue