From efd7facf34013074b40cb110bb6a9fc993193036 Mon Sep 17 00:00:00 2001 From: Jay Oster Date: Sat, 11 Apr 2026 09:44:16 -0700 Subject: [PATCH 1/3] Increase CI coverage Adds all of the CI jobs from the GitLab config. --- .github/workflows/rust.yml | 72 +++++++++++++++++++++++++++++++++++--- 1 file changed, 67 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9fd45e0..14a334e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -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.16.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 From 8768f0634be065d1935717ea87d21bd788dd2835 Mon Sep 17 00:00:00 2001 From: Jay Oster Date: Sat, 11 Apr 2026 09:52:26 -0700 Subject: [PATCH 2/3] Update cargo-deny Needed because the old version doesn't understand Edition 2024. This might break the config. CI will tell us. --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 14a334e..2cbc1c9 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -20,7 +20,7 @@ jobs: uses: baptiste0928/cargo-install@v3 with: crate: cargo-deny - version: "=0.16.1" + version: "=0.19.1" - name: Cargo deny run: cargo deny --locked --workspace check all From d1cdb5827902280e7247327d0405bef2ce00337e Mon Sep 17 00:00:00 2001 From: Jay Oster Date: Sat, 11 Apr 2026 10:00:57 -0700 Subject: [PATCH 3/3] cargo clippy --- src/model/gains.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/model/gains.rs b/src/model/gains.rs index 10d3268..ff2fe4a 100644 --- a/src/model/gains.rs +++ b/src/model/gains.rs @@ -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 @@ -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;