Add CI
Add basic CI build. Also, move tvl route to /cauldron/
This commit is contained in:
parent
69405d035a
commit
61157dd65a
3 changed files with 36 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1 +1,2 @@
|
||||||
/target
|
/target
|
||||||
|
*.db
|
||||||
|
|
|
||||||
34
.gitlab-ci.yml
Normal file
34
.gitlab-ci.yml
Normal 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
|
||||||
|
|
||||||
|
|
@ -207,5 +207,5 @@ fn launch() -> _ {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
rocket::build().manage(conn).mount("/", routes![tvl])
|
rocket::build().manage(conn).mount("/cauldron/", routes![tvl])
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue