Skip to content

Commit

Permalink
add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
CapCap authored and aptos-bot committed Apr 15, 2022
1 parent 807f787 commit 26d8044
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@ jobs:
executor: ubuntu-2xl
steps:
- dev-setup
- run: RUST_BACKTRACE=full cargo nextest --nextest-profile ci --partition hash:1/1 --test-threads 5 --package smoke-test
- run: docker run --detach -p 5432:5432 cimg/postgres:14.2
- run: INDEXER_DATABASE_URL="postgresql://postgres@localhost/postgres" RUST_BACKTRACE=full cargo nextest --nextest-profile ci --partition hash:1/1 --test-threads 5 --package smoke-test
unit-test:
executor: ubuntu-2xl
steps:
- dev-setup
- run: cargo xtest --doc --unit --changed-since "origin/main"
- run: cargo nextest --nextest-profile ci --partition hash:1/1 --unit --exclude backup-cli --changed-since "origin/main"
- run: docker run --detach -p 5432:5432 cimg/postgres:14.2
- run: INDEXER_DATABASE_URL="postgresql://postgres@localhost/postgres" cargo nextest --nextest-profile ci --partition hash:1/1 --unit --exclude backup-cli --changed-since "origin/main"
docker-build-push:
executor: ubuntu-medium
parameters:
Expand Down Expand Up @@ -314,7 +316,7 @@ commands:
steps:
- checkout
- run: sudo apt-get update
- run: sudo apt-get install build-essential ca-certificates clang curl git libssl-dev pkg-config --no-install-recommends --assume-yes
- run: sudo apt-get install build-essential ca-certificates clang curl git libpq-dev libssl-dev pkg-config --no-install-recommends --assume-yes
- run: curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable
- run: cat $HOME/.cargo/env >> $BASH_ENV
deploy-setup:
Expand Down
8 changes: 5 additions & 3 deletions ecosystem/indexer/src/indexer/tailer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,11 @@ pub async fn await_tasks<T: Debug>(tasks: Vec<JoinHandle<T>>) -> Vec<T> {
#[cfg(test)]
mod test {
use super::*;
use crate::database::{new_db_pool, PgPoolConnection};
use crate::default_processor::DefaultTransactionProcessor;
use crate::models::transactions::TransactionModel;
use crate::{
database::{new_db_pool, PgPoolConnection},
default_processor::DefaultTransactionProcessor,
models::transactions::TransactionModel,
};
use diesel::Connection;
use serde_json::json;

Expand Down

0 comments on commit 26d8044

Please sign in to comment.