mirror of
https://github.com/Nutomic/ibis.git
synced 2024-11-26 12:01:08 +00:00
debug ci
This commit is contained in:
parent
daa5412271
commit
c5a2e9d353
2 changed files with 18 additions and 17 deletions
|
@ -2,6 +2,23 @@ variables:
|
|||
- &rust_image "rust:1.75"
|
||||
|
||||
steps:
|
||||
|
||||
cargo_test:
|
||||
image: *rust_image
|
||||
environment:
|
||||
LEMMY_DATABASE_URL: postgres://ibis:password@database:5432/ibis
|
||||
CARGO_HOME: .cargo_home
|
||||
commands:
|
||||
- apt-get update
|
||||
- apt-get install postgresql sudo -y --no-install-recommends --no-install-suggests
|
||||
# dbinit (used by tests to create temp db) refuses to run as root so we need to setup another user
|
||||
- adduser testuser
|
||||
- cp /usr/local/rustup /home/testuser/.rustup -r
|
||||
- chown testuser:testuser . -R
|
||||
- chown testuser:testuser /home/testuser -R
|
||||
- export PATH="/usr/lib/postgresql/15/bin:/usr/local/cargo/bin:$PATH"
|
||||
- sudo -u testuser env "PATH=$PATH" cargo test --no-fail-fast test_create_read_and_edit_local_article
|
||||
|
||||
cargo_fmt:
|
||||
image: *rust_image
|
||||
environment:
|
||||
|
@ -45,22 +62,6 @@ steps:
|
|||
- rustup component add clippy
|
||||
- cargo clippy --tests --all-targets --all-features
|
||||
|
||||
cargo_test:
|
||||
image: *rust_image
|
||||
environment:
|
||||
LEMMY_DATABASE_URL: postgres://ibis:password@database:5432/ibis
|
||||
CARGO_HOME: .cargo_home
|
||||
commands:
|
||||
- apt-get update
|
||||
- apt-get install postgresql sudo -y --no-install-recommends --no-install-suggests
|
||||
# dbinit (used by tests to create temp db) refuses to run as root so we need to setup another user
|
||||
- adduser testuser
|
||||
- cp /usr/local/rustup /home/testuser/.rustup -r
|
||||
- chown testuser:testuser . -R
|
||||
- chown testuser:testuser /home/testuser -R
|
||||
- export PATH="/usr/lib/postgresql/15/bin:/usr/local/cargo/bin:$PATH"
|
||||
- sudo -u testuser env "PATH=$PATH" cargo test --no-fail-fast
|
||||
|
||||
services:
|
||||
database:
|
||||
image: postgres:15.2-alpine
|
||||
|
|
|
@ -119,7 +119,7 @@ impl IbisInstance {
|
|||
..Default::default()
|
||||
};
|
||||
let handle = tokio::task::spawn(async move {
|
||||
start(config).await.unwrap();
|
||||
dbg!(start(config).await).unwrap();
|
||||
});
|
||||
// wait a moment for the backend to start
|
||||
tokio::time::sleep(Duration::from_millis(100)).await;
|
||||
|
|
Loading…
Reference in a new issue