Merge branch 'ci' into 'master'
Add CI See merge request riftenlabs/riftenlabs-indexer!1
This commit is contained in:
commit
703eb3dfba
3 changed files with 41 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1 +1,2 @@
|
|||
/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
|
||||
|
||||
|
|
@ -3,7 +3,8 @@ use bitcoin_hashes::hex::ToHex;
|
|||
use bitcoincash::{consensus::deserialize, Block};
|
||||
use db::get_token_tvl;
|
||||
use electrum_client::{Client, ElectrumApi, Param};
|
||||
use riftenlabs_defi::cauldron::{ParsedContract, parse_cauldron};
|
||||
use rayon::prelude::*;
|
||||
use riftenlabs_defi::cauldron::{parse_cauldron, ParsedContract};
|
||||
use rocket::{
|
||||
get,
|
||||
http::Status,
|
||||
|
|
@ -28,7 +29,6 @@ use std::{
|
|||
thread,
|
||||
time::Duration,
|
||||
};
|
||||
use rayon::prelude::*;
|
||||
|
||||
use crate::{
|
||||
chainutil::calculate_mtp,
|
||||
|
|
@ -207,5 +207,7 @@ 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