Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI

on:
pull_request:
push:
branches:
- main

concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
check_fmt_and_test:
name: Check, Format, and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt
# - uses: Swatinem/rust-cache@v2
# with:
# shared-key: check
# cache-on-failure: true
- run: cargo fmt --check
- run: cargo clippy --all-targets --all-features
- run: cargo test
2 changes: 1 addition & 1 deletion src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ use std::env;
pub static ERGO_NODE_URL: Lazy<String> = Lazy::new(|| get_var("ERGO_NODE_URL"));

fn get_var(key: &str) -> String {
env::var(key).expect(&format!("Environment variable `{}` must be set", key))
env::var(key).unwrap_or_else(|_| panic!("Environment variable `{key}` must be set"))
}
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ pub mod clients;
pub mod env;
pub mod error;
pub mod mempool;
pub mod types;
pub mod tracing;
pub mod types;