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
72 changes: 67 additions & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,75 @@ env:
CARGO_TERM_COLOR: always

jobs:
build:
audits:
name: Audit
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v6
- name: Install cargo-deny
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-deny
version: "=0.19.1"
- name: Cargo deny
run: cargo deny --locked --workspace check all

checks:
name: Checks
runs-on: ubuntu-latest
needs: [audits]
steps:
- name: Checkout sources
uses: actions/checkout@v6
- name: Cargo check
run: cargo check --benches --examples --tests --workspace

lints:
name: Lints
runs-on: ubuntu-latest
needs: [audits]
steps:
- name: Checkout sources
uses: actions/checkout@v6
- name: Install cargo-machete
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-machete
version: "=0.7.0"
- name: Cargo fmt
run: cargo fmt --all -- --check
- name: Cargo doc
run: cargo doc --workspace --no-deps --all-features
- name: Cargo clippy
run: cargo clippy --workspace --tests --all-features -- -D warnings
- name: Cargo machete
run: cargo machete --with-metadata

tests:
name: Tests
runs-on: ubuntu-latest
needs: [checks, lints]
steps:
- name: Checkout sources
uses: actions/checkout@v6
- name: Cargo test
run: cargo test --workspace --all-features
- name: Cargo test release
run: cargo test --workspace --all-features --release
- name: Cargo loom test fett
env:
RUSTFLAGS: "--cfg loom"
run: cargo test --package fett --all-features --tests --release

build:
name: Build
runs-on: ubuntu-latest
needs: [tests]
steps:
- uses: actions/checkout@v4
- name: Checkout sources
uses: actions/checkout@v6
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
run: cargo build --workspace
- name: Build release
run: cargo build --workspace --release
7 changes: 2 additions & 5 deletions src/model/gains.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,7 @@ impl Display for CapGainsIncomeDetails<'_> {
// Write the CSV header
writeln!(
f,
concat!(
// Columns A-D
r#""Ledger Row ID","Asset Name","Asset Amount","Proceeds""#,
)
r#""Ledger Row ID","Asset Name","Asset Amount","Proceeds""#
)?;

// Write CSV rows
Expand Down Expand Up @@ -427,7 +424,7 @@ impl Display for Sums {
// Write the CSV header
writeln!(
f,
concat!(r#""","US Long Term","US Short Term","Non-US Long Term","Non-US Short Term""#,)
r#""","US Long Term","US Short Term","Non-US Long Term","Non-US Short Term""#,
)?;

let bona_fide_long = &self.gain_matrix.bona_fide_long;
Expand Down
Loading