Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add basic ci #24

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
25 changes: 25 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# From https://github.com/actions-rust-lang/setup-rust-toolchain
name: "Test Suite"
on:
push:
pull_request:
jobs:
test:
name: cargo test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo test --all-features
# Check formatting with rustfmt
formatting:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Ensure rustfmt is installed and setup problem matcher
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt
- name: Rustfmt Check
uses: actions-rust-lang/rustfmt@v1
2 changes: 0 additions & 2 deletions src/util/aux_counts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@ use itertools::izip;
pub struct CountInfo {
pub unique_count: u32,
pub total_count: u32,
pub expected_count: f64,
}

impl CountInfo {
pub fn new() -> Self {
Self {
unique_count: 0,
total_count: 0,
expected_count: 0.0,
}
}
}
Expand Down
7 changes: 0 additions & 7 deletions src/util/oarfish_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ impl<T: sam::alignment::record::Record> From<&T> for AlnInfo {
#[serde(rename_all = "PascalCase")]
pub struct ShortReadRecord {
pub name: String,
pub length: i32,
pub effective_length: f64,
#[serde(rename = "TPM")]
pub tpm: f64,
pub num_reads: f64,
}

Expand All @@ -93,9 +89,6 @@ impl ShortReadRecord {
pub fn empty(name: &str) -> Self {
Self {
name: name.to_owned(),
length: 0,
effective_length: 0.0,
tpm: 0.0,
num_reads: 0.0,
}
}
Expand Down