From 7da23aee1c63399e277bed70ad899483dd67f63d Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Tue, 5 Nov 2024 08:55:10 -0500 Subject: [PATCH] Run cargo test and fix it (#3663) run cargo test and fix it --- .github/workflows/tests.yaml | 31 +++++++++++++++++++++++++++++++ src/taskchampion-cpp/src/lib.rs | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index c2b2cb709..656dc6f96 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -94,6 +94,37 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + cargo-test: + runs-on: ubuntu-latest + name: "Cargo Test" + + steps: + - uses: actions/checkout@v4 + + - name: Cache cargo registry + uses: actions/cache@v4 + with: + path: ~/.cargo/registry + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + + - name: Cache cargo build + uses: actions/cache@v4 + with: + path: target + key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} + + - uses: actions-rs/toolchain@v1 + with: + # If this version is old enough to cause errors, or older than the + # TaskChampion MSRV, bump it to the MSRV of the currently-required + # TaskChampion package; if necessary, bump that version as well. + toolchain: "1.73.0" # MSRV + override: true + + - uses: actions-rs/cargo@v1.0.3 + with: + command: test + tests: needs: coverage strategy: diff --git a/src/taskchampion-cpp/src/lib.rs b/src/taskchampion-cpp/src/lib.rs index 622eebc49..2fc2f92df 100644 --- a/src/taskchampion-cpp/src/lib.rs +++ b/src/taskchampion-cpp/src/lib.rs @@ -943,7 +943,7 @@ mod test { assert_eq!(t.properties(), vec!["prop".to_string()]); assert_eq!( - t.iter(), + t.items(), vec![ffi::PropValuePair { prop: "prop".into(), value: "value".into(),