Add basic CI build. Also, move tvl route to /cauldron/
This commit is contained in:
Dagur Valberg Johannsson 2024-01-05 14:19:21 +01:00
parent 69405d035a
commit 61157dd65a
No known key found for this signature in database
GPG key ID: FD701804AEE88107
3 changed files with 36 additions and 1 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
/target
*.db

34
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,34 @@
variables:
CARGO_HOME: $CI_PROJECT_DIR/cargo
cache:
paths:
- $CARGO_HOME
- target/
build-release:
image: rust:latest
script:
- cargo build --verbose --release
artifacts:
paths:
- target/release/
expire_in: 30 days
test:
image: rust:latest
script:
- cargo test --verbose --release
format_check:
image: rust:latest
script:
- rustup component add rustfmt
- cargo fmt -- --check
clippy:
image: rust:latest
script:
- rustup component add clippy
- cargo clippy -- -D warnings

View file

@ -207,5 +207,5 @@ fn launch() -> _ {
}
});
rocket::build().manage(conn).mount("/", routes![tvl])
rocket::build().manage(conn).mount("/cauldron/", routes![tvl])
}