From 00ce3f3222429623d28e7114d5ec3c52d200b3c0 Mon Sep 17 00:00:00 2001 From: colemanirby Date: Thu, 13 Feb 2025 09:35:15 -0600 Subject: [PATCH 01/30] temporarily add test branch to trigger workflow --- .github/workflows/rust.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 46b23df..a4607de 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - cki/code-coverage pull_request: branches: - main From 457ac465f011b9566b00c24fc6ab52837262640d Mon Sep 17 00:00:00 2001 From: colemanirby Date: Thu, 13 Feb 2025 09:55:10 -0600 Subject: [PATCH 02/30] add tarpaulin to the workflow and add code coverage summary --- .github/workflows/rust.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a4607de..09ce196 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -49,5 +49,15 @@ jobs: - name: Run cargo clippy run: cargo clippy -- -D warnings - - name: Run cargo test - run: cargo test --verbose --no-fail-fast \ No newline at end of file + - name: rust-tarpaulin + uses: actions-rs/tarpaulin@v0.1.0 + with: + args: '--no-fail-fast' + + - name: Code Coverage Summary + uses: irongut/CodeCoverageSummary@v1.3.0 + with: + filename: cobertura.xml + badge: true + fail_below_min: true + thresholds: '80 85' \ No newline at end of file From a5c998b85753809fa44899a9a4d4da71dfb53ef3 Mon Sep 17 00:00:00 2001 From: colemanirby Date: Thu, 13 Feb 2025 10:22:23 -0600 Subject: [PATCH 03/30] add tarpaulin version --- .github/workflows/rust.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 09ce196..9c34115 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -52,6 +52,7 @@ jobs: - name: rust-tarpaulin uses: actions-rs/tarpaulin@v0.1.0 with: + version: '0.31.5' args: '--no-fail-fast' - name: Code Coverage Summary From e7d9b8864337bdd33978a95abf8653a731f7b69c Mon Sep 17 00:00:00 2001 From: colemanirby Date: Thu, 13 Feb 2025 11:27:55 -0600 Subject: [PATCH 04/30] use tarpaulin directly --- .github/workflows/rust.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9c34115..8011222 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -49,11 +49,8 @@ jobs: - name: Run cargo clippy run: cargo clippy -- -D warnings - - name: rust-tarpaulin - uses: actions-rs/tarpaulin@v0.1.0 - with: - version: '0.31.5' - args: '--no-fail-fast' + - name: Run tarpaulin + run: cargo tarpaulin --no-fail-fast -out xml - name: Code Coverage Summary uses: irongut/CodeCoverageSummary@v1.3.0 From e4530a9a5f6262a59c06c40edfae171a8713f1a0 Mon Sep 17 00:00:00 2001 From: colemanirby Date: Thu, 13 Feb 2025 11:28:27 -0600 Subject: [PATCH 05/30] fix typo --- .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 8011222..61d344c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -50,7 +50,7 @@ jobs: run: cargo clippy -- -D warnings - name: Run tarpaulin - run: cargo tarpaulin --no-fail-fast -out xml + run: cargo tarpaulin --no-fail-fast --out xml - name: Code Coverage Summary uses: irongut/CodeCoverageSummary@v1.3.0 From 699894c05c63c4222576061d58578a47378d8eda Mon Sep 17 00:00:00 2001 From: colemanirby Date: Thu, 13 Feb 2025 11:35:36 -0600 Subject: [PATCH 06/30] add tarpaulin install --- .github/workflows/rust.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 61d344c..edabfc3 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -49,7 +49,10 @@ jobs: - name: Run cargo clippy run: cargo clippy -- -D warnings - - name: Run tarpaulin + - name: Install cargo-tarpaulin + run: cargo install cargo-tarpaulin + + - name: Run cargo tarpaulin run: cargo tarpaulin --no-fail-fast --out xml - name: Code Coverage Summary From 44667dc05f2e68fd3258fb8abfd40789cb6c8385 Mon Sep 17 00:00:00 2001 From: colemanirby Date: Thu, 13 Feb 2025 11:50:19 -0600 Subject: [PATCH 07/30] use example from tarpaulin github --- .github/workflows/rust.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index edabfc3..5079910 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -48,12 +48,18 @@ jobs: - name: Run cargo clippy run: cargo clippy -- -D warnings + test: + runs-on: ubuntu-latest + container: + image: xd009642/tarpaulin:develop-nightly + options: --security-opt seccomp=unconfined + steps: + - name: Checkout code + uses: actions/checkout@v4 - - name: Install cargo-tarpaulin - run: cargo install cargo-tarpaulin - - - name: Run cargo tarpaulin - run: cargo tarpaulin --no-fail-fast --out xml + - name: Generate code coverage + run: | + cargo +nightly tarpaulin --verbose --all-features --workspace --no-fail-fast --timeout 120 --out xml - name: Code Coverage Summary uses: irongut/CodeCoverageSummary@v1.3.0 @@ -61,4 +67,4 @@ jobs: filename: cobertura.xml badge: true fail_below_min: true - thresholds: '80 85' \ No newline at end of file + thresholds: '80 85' From f926871aedc90da0101df556541405f3228faa7e Mon Sep 17 00:00:00 2001 From: colemanirby Date: Thu, 13 Feb 2025 12:11:55 -0600 Subject: [PATCH 08/30] revert back to installing tarpaulin then running tests --- .github/workflows/rust.yml | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 5079910..93a0d1d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -48,23 +48,17 @@ jobs: - name: Run cargo clippy run: cargo clippy -- -D warnings - test: - runs-on: ubuntu-latest - container: - image: xd009642/tarpaulin:develop-nightly - options: --security-opt seccomp=unconfined - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Generate code coverage - run: | - cargo +nightly tarpaulin --verbose --all-features --workspace --no-fail-fast --timeout 120 --out xml + - name: Install cargo-tarpaulin + run: cargo install cargo-tarpaulin + + - name: Run cargo tarpaulin + run: cargo tarpaulin --rustflags="-C opt-level=0" --no-fail-fast --out xml - name: Code Coverage Summary uses: irongut/CodeCoverageSummary@v1.3.0 with: filename: cobertura.xml badge: true - fail_below_min: true - thresholds: '80 85' + fail_below_min: false + thresholds: '80 85' \ No newline at end of file From f9277ecd1e3b0d296a59236a1654024ab158b847 Mon Sep 17 00:00:00 2001 From: colemanirby Date: Thu, 13 Feb 2025 12:13:41 -0600 Subject: [PATCH 09/30] add file output for code coverage --- .github/workflows/rust.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 93a0d1d..871d90f 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -61,4 +61,5 @@ jobs: filename: cobertura.xml badge: true fail_below_min: false - thresholds: '80 85' \ No newline at end of file + thresholds: '80 85' + output: both \ No newline at end of file From 1c26d40a6e7e65081eb809fde9d4a34294b0f42f Mon Sep 17 00:00:00 2001 From: colemanirby Date: Thu, 13 Feb 2025 13:25:09 -0600 Subject: [PATCH 10/30] test adding code coverage comments --- .github/workflows/rust.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 871d90f..75c1e26 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -62,4 +62,10 @@ jobs: badge: true fail_below_min: false thresholds: '80 85' - output: both \ No newline at end of file + output: both + format: markdown + - name: Add Coverage Comment + uses: marocchino/sticky-pull-request-comment@v2 + with: + recreate: true + path: code-coverage-results.md \ No newline at end of file From e98a45a35f72d413a0637827c3606ee0fcef4887 Mon Sep 17 00:00:00 2001 From: colemanirby Date: Thu, 13 Feb 2025 13:49:21 -0600 Subject: [PATCH 11/30] temporarily comment out long running test --- .../randomness-beacon/src/gossipsub.rs | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/client/consensus/randomness-beacon/src/gossipsub.rs b/client/consensus/randomness-beacon/src/gossipsub.rs index 05ce7ae..8e66d92 100644 --- a/client/consensus/randomness-beacon/src/gossipsub.rs +++ b/client/consensus/randomness-beacon/src/gossipsub.rs @@ -316,30 +316,30 @@ mod tests { assert!(matches!(res, Err(Error::SwarmListenFailure)), "Expected SwarmListenFailure error"); } - #[tokio::test] - async fn can_fail_to_add_pulses_when_state_locked() { - let topic_str: &str = - "/drand/pubsub/v0.0.0/52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971"; - - let maddr1: libp2p::Multiaddr = - "/ip4/184.72.27.233/tcp/44544/p2p/12D3KooWBhAkxEn3XE7QanogjGrhyKBMC5GeM3JUTqz54HqS6VHG" - .parse() - .expect("The string is a well-formatted multiaddress. qed."); - - let maddr2: libp2p::Multiaddr = - "/ip4/54.193.191.250/tcp/44544/p2p/12D3KooWQqDi3D3KLfDjWATQUUE4o5aSshwBFi9JM36wqEPMPD5y" - .parse() - .expect("The string is a well-formatted multiaddress. qed."); - - let (mut gossipsub, state) = build_node(); - // prematurely lock the state - let data_lock = state.lock().unwrap(); - - tokio::spawn(async move { - if let Err(e) = gossipsub.run(topic_str, vec![&maddr1, &maddr2], None).await { - log::error!("Failed to run gossipsub network: {:?}", e); - } - }); + // #[tokio::test] + // async fn can_fail_to_add_pulses_when_state_locked() { + // let topic_str: &str = + // "/drand/pubsub/v0.0.0/52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971"; + + // let maddr1: libp2p::Multiaddr = + // "/ip4/184.72.27.233/tcp/44544/p2p/12D3KooWBhAkxEn3XE7QanogjGrhyKBMC5GeM3JUTqz54HqS6VHG" + // .parse() + // .expect("The string is a well-formatted multiaddress. qed."); + + // let maddr2: libp2p::Multiaddr = + // "/ip4/54.193.191.250/tcp/44544/p2p/12D3KooWQqDi3D3KLfDjWATQUUE4o5aSshwBFi9JM36wqEPMPD5y" + // .parse() + // .expect("The string is a well-formatted multiaddress. qed."); + + // let (mut gossipsub, state) = build_node(); + // // prematurely lock the state + // let data_lock = state.lock().unwrap(); + + // tokio::spawn(async move { + // if let Err(e) = gossipsub.run(topic_str, vec![&maddr1, &maddr2], None).await { + // log::error!("Failed to run gossipsub network: {:?}", e); + // } + // }); // Sleep for 6 secs sleep(Duration::from_millis(6000)).await; From e3a587be285f95c31b7e6fb060a2b9b4a2762099 Mon Sep 17 00:00:00 2001 From: colemanirby Date: Thu, 13 Feb 2025 13:50:26 -0600 Subject: [PATCH 12/30] missed line on comments --- client/consensus/randomness-beacon/src/gossipsub.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/client/consensus/randomness-beacon/src/gossipsub.rs b/client/consensus/randomness-beacon/src/gossipsub.rs index 8e66d92..6851fc2 100644 --- a/client/consensus/randomness-beacon/src/gossipsub.rs +++ b/client/consensus/randomness-beacon/src/gossipsub.rs @@ -341,11 +341,11 @@ mod tests { // } // }); - // Sleep for 6 secs - sleep(Duration::from_millis(6000)).await; - let pulses = &data_lock.pulses; - assert!(pulses.len() == 0); - } + // // Sleep for 6 secs + // sleep(Duration::from_millis(6000)).await; + // let pulses = &data_lock.pulses; + // assert!(pulses.len() == 0); + // } #[tokio::test] async fn can_fail_to_subscribe_to_topic_with_no_peers() { From 8dd530e386f058bbe2b28b261865062d93932a3c Mon Sep 17 00:00:00 2001 From: colemanirby Date: Thu, 13 Feb 2025 13:55:14 -0600 Subject: [PATCH 13/30] temporarily remove long running test --- .../randomness-beacon/src/gossipsub.rs | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/client/consensus/randomness-beacon/src/gossipsub.rs b/client/consensus/randomness-beacon/src/gossipsub.rs index 6851fc2..f7caa16 100644 --- a/client/consensus/randomness-beacon/src/gossipsub.rs +++ b/client/consensus/randomness-beacon/src/gossipsub.rs @@ -316,36 +316,6 @@ mod tests { assert!(matches!(res, Err(Error::SwarmListenFailure)), "Expected SwarmListenFailure error"); } - // #[tokio::test] - // async fn can_fail_to_add_pulses_when_state_locked() { - // let topic_str: &str = - // "/drand/pubsub/v0.0.0/52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971"; - - // let maddr1: libp2p::Multiaddr = - // "/ip4/184.72.27.233/tcp/44544/p2p/12D3KooWBhAkxEn3XE7QanogjGrhyKBMC5GeM3JUTqz54HqS6VHG" - // .parse() - // .expect("The string is a well-formatted multiaddress. qed."); - - // let maddr2: libp2p::Multiaddr = - // "/ip4/54.193.191.250/tcp/44544/p2p/12D3KooWQqDi3D3KLfDjWATQUUE4o5aSshwBFi9JM36wqEPMPD5y" - // .parse() - // .expect("The string is a well-formatted multiaddress. qed."); - - // let (mut gossipsub, state) = build_node(); - // // prematurely lock the state - // let data_lock = state.lock().unwrap(); - - // tokio::spawn(async move { - // if let Err(e) = gossipsub.run(topic_str, vec![&maddr1, &maddr2], None).await { - // log::error!("Failed to run gossipsub network: {:?}", e); - // } - // }); - - // // Sleep for 6 secs - // sleep(Duration::from_millis(6000)).await; - // let pulses = &data_lock.pulses; - // assert!(pulses.len() == 0); - // } #[tokio::test] async fn can_fail_to_subscribe_to_topic_with_no_peers() { From 2eeee47c1fdc2c8edc6c8f2c32c4249d1b11b243 Mon Sep 17 00:00:00 2001 From: colemanirby Date: Thu, 13 Feb 2025 13:55:31 -0600 Subject: [PATCH 14/30] remove extra blank space --- client/consensus/randomness-beacon/src/gossipsub.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/client/consensus/randomness-beacon/src/gossipsub.rs b/client/consensus/randomness-beacon/src/gossipsub.rs index f7caa16..7d8b19a 100644 --- a/client/consensus/randomness-beacon/src/gossipsub.rs +++ b/client/consensus/randomness-beacon/src/gossipsub.rs @@ -316,7 +316,6 @@ mod tests { assert!(matches!(res, Err(Error::SwarmListenFailure)), "Expected SwarmListenFailure error"); } - #[tokio::test] async fn can_fail_to_subscribe_to_topic_with_no_peers() { let topic_str: &str = From f46de18266462ee6d2d415690fe31ab6cafe5a8a Mon Sep 17 00:00:00 2001 From: colemanirby Date: Thu, 13 Feb 2025 14:10:35 -0600 Subject: [PATCH 15/30] update to use push for code coverage --- .github/workflows/rust.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 75c1e26..453545a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -67,5 +67,7 @@ jobs: - name: Add Coverage Comment uses: marocchino/sticky-pull-request-comment@v2 with: + number: ${{ steps.finder.outputs.pr }} + header: build recreate: true path: code-coverage-results.md \ No newline at end of file From 4e335a6a3869301720c340dce3f8fa26c3450be4 Mon Sep 17 00:00:00 2001 From: colemanirby Date: Thu, 13 Feb 2025 14:12:30 -0600 Subject: [PATCH 16/30] add finder --- .github/workflows/rust.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 453545a..98e3f40 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -64,6 +64,10 @@ jobs: thresholds: '80 85' output: both format: markdown + - name: Find Current Pull Request + uses: jwalton/gh-find-current-pr@v1.3.3 + id: finder + - name: Add Coverage Comment uses: marocchino/sticky-pull-request-comment@v2 with: From bfdfe1e00cd9ef45438ccd459874a8d60fa5ce4b Mon Sep 17 00:00:00 2001 From: colemanirby Date: Thu, 13 Feb 2025 14:24:41 -0600 Subject: [PATCH 17/30] adding permissions --- .github/workflows/rust.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 98e3f40..da5de04 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -66,6 +66,8 @@ jobs: format: markdown - name: Find Current Pull Request uses: jwalton/gh-find-current-pr@v1.3.3 + permissions: + pull-requests: write id: finder - name: Add Coverage Comment From 217618c9364c40104d7e937ae7f71f337732b2b6 Mon Sep 17 00:00:00 2001 From: colemanirby Date: Thu, 13 Feb 2025 14:30:27 -0600 Subject: [PATCH 18/30] moving permissions --- .github/workflows/rust.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index da5de04..c6b0b09 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -12,6 +12,8 @@ on: jobs: build: runs-on: ubuntu-latest + permissions: + pull-requests: write steps: - name: Checkout code @@ -66,8 +68,6 @@ jobs: format: markdown - name: Find Current Pull Request uses: jwalton/gh-find-current-pr@v1.3.3 - permissions: - pull-requests: write id: finder - name: Add Coverage Comment From 3210575ac1b8059b4e3b48f1470a3db8a1cfa187 Mon Sep 17 00:00:00 2001 From: colemanirby Date: Thu, 13 Feb 2025 14:43:15 -0600 Subject: [PATCH 19/30] move permissions to top level --- .github/workflows/rust.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index c6b0b09..2ab27d8 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -9,11 +9,13 @@ on: branches: - main + permissions: + pull-requests: write + contents: read + jobs: build: runs-on: ubuntu-latest - permissions: - pull-requests: write steps: - name: Checkout code From d1de29ddf646f7d322342ab62e0db5dd3eb47c77 Mon Sep 17 00:00:00 2001 From: colemanirby Date: Thu, 13 Feb 2025 15:07:07 -0600 Subject: [PATCH 20/30] use github step summary --- .github/workflows/rust.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 2ab27d8..9f85a17 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -78,4 +78,6 @@ jobs: number: ${{ steps.finder.outputs.pr }} header: build recreate: true - path: code-coverage-results.md \ No newline at end of file + path: code-coverage-results.md + - name: Add markdown + run: echo code-coverage-results.md >> $GITHUB_STEP_SUMMARY \ No newline at end of file From a5b00776f2826ba19d3e107647367dc3fdb100c3 Mon Sep 17 00:00:00 2001 From: colemanirby Date: Thu, 13 Feb 2025 15:22:28 -0600 Subject: [PATCH 21/30] update output of echo --- .github/workflows/rust.yml | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9f85a17..13a909b 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -68,16 +68,6 @@ jobs: thresholds: '80 85' output: both format: markdown - - name: Find Current Pull Request - uses: jwalton/gh-find-current-pr@v1.3.3 - id: finder - - name: Add Coverage Comment - uses: marocchino/sticky-pull-request-comment@v2 - with: - number: ${{ steps.finder.outputs.pr }} - header: build - recreate: true - path: code-coverage-results.md - - name: Add markdown - run: echo code-coverage-results.md >> $GITHUB_STEP_SUMMARY \ No newline at end of file + - name: Add Job Summary + run: echo "$(> $GITHUB_STEP_SUMMARY \ No newline at end of file From 6d035d00c92d403ae99539a6fb858afa0ad576d5 Mon Sep 17 00:00:00 2001 From: colemanirby Date: Thu, 13 Feb 2025 15:38:12 -0600 Subject: [PATCH 22/30] update step names --- .github/workflows/rust.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 13a909b..c5caf7b 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -59,7 +59,7 @@ jobs: - name: Run cargo tarpaulin run: cargo tarpaulin --rustflags="-C opt-level=0" --no-fail-fast --out xml - - name: Code Coverage Summary + - name: Generate Code Coverage Summary uses: irongut/CodeCoverageSummary@v1.3.0 with: filename: cobertura.xml @@ -69,5 +69,5 @@ jobs: output: both format: markdown - - name: Add Job Summary + - name: Export Job Summary run: echo "$(> $GITHUB_STEP_SUMMARY \ No newline at end of file From 5eea83fe3175a538f41ce627990c3943c448500a Mon Sep 17 00:00:00 2001 From: colemanirby Date: Fri, 14 Feb 2025 09:10:23 -0600 Subject: [PATCH 23/30] add tarpaulin config --- .tarpaulin.toml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .tarpaulin.toml diff --git a/.tarpaulin.toml b/.tarpaulin.toml new file mode 100644 index 0000000..404aa46 --- /dev/null +++ b/.tarpaulin.toml @@ -0,0 +1 @@ +exclude-files = "./solochain/*" \ No newline at end of file From c4879e1aec6472ca83b0451af2578c03024cc4fc Mon Sep 17 00:00:00 2001 From: colemanirby Date: Fri, 14 Feb 2025 09:11:10 -0600 Subject: [PATCH 24/30] add configuration name to config file --- .tarpaulin.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/.tarpaulin.toml b/.tarpaulin.toml index 404aa46..edfa342 100644 --- a/.tarpaulin.toml +++ b/.tarpaulin.toml @@ -1 +1,2 @@ +[ignore] exclude-files = "./solochain/*" \ No newline at end of file From c12848a8a38a4d0326473821d47895e067e1074f Mon Sep 17 00:00:00 2001 From: colemanirby Date: Fri, 14 Feb 2025 09:11:59 -0600 Subject: [PATCH 25/30] remove permissions from rust.yml --- .github/workflows/rust.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index c5caf7b..f54c739 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -8,11 +8,7 @@ on: pull_request: branches: - main - - permissions: - pull-requests: write - contents: read - + jobs: build: runs-on: ubuntu-latest From fbb8b80a72f1ae8864a93d29f71cbbae886e9f49 Mon Sep 17 00:00:00 2001 From: colemanirby Date: Fri, 14 Feb 2025 09:19:14 -0600 Subject: [PATCH 26/30] update toml file name --- .tarpaulin.toml => tarpaulin.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .tarpaulin.toml => tarpaulin.toml (68%) diff --git a/.tarpaulin.toml b/tarpaulin.toml similarity index 68% rename from .tarpaulin.toml rename to tarpaulin.toml index edfa342..a62096f 100644 --- a/.tarpaulin.toml +++ b/tarpaulin.toml @@ -1,2 +1,2 @@ -[ignore] +[test_config] exclude-files = "./solochain/*" \ No newline at end of file From 5cfcba675b2832a5e6ac55a8170ebc15b737f8f2 Mon Sep 17 00:00:00 2001 From: colemanirby Date: Fri, 14 Feb 2025 09:22:54 -0600 Subject: [PATCH 27/30] update folder to ignore --- tarpaulin.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tarpaulin.toml b/tarpaulin.toml index a62096f..849048c 100644 --- a/tarpaulin.toml +++ b/tarpaulin.toml @@ -1,2 +1,2 @@ [test_config] -exclude-files = "./solochain/*" \ No newline at end of file +exclude-files = "solochain/*" \ No newline at end of file From dcd5d426af19412cba241158a1fc08a89bde8444 Mon Sep 17 00:00:00 2001 From: colemanirby Date: Fri, 14 Feb 2025 09:41:42 -0600 Subject: [PATCH 28/30] update ignored files --- tarpaulin.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tarpaulin.toml b/tarpaulin.toml index 849048c..a3b33e8 100644 --- a/tarpaulin.toml +++ b/tarpaulin.toml @@ -1,2 +1,5 @@ +# https://github.com/xd009642/tarpaulin/blob/develop/tarpaulin.toml [test_config] -exclude-files = "solochain/*" \ No newline at end of file + +# List of file paths to exclude from testing. +exclude-files = ["solochain/*", "pallets/drand/examples/solochain/*"] \ No newline at end of file From a05e368e7b6ab952575d724a29a9851cee40c979 Mon Sep 17 00:00:00 2001 From: colemanirby Date: Mon, 24 Feb 2025 09:22:49 -0600 Subject: [PATCH 29/30] Fail build when code coverage falls below 50%. Needs to be changed to 80% later. --- .github/workflows/rust.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f54c739..2827caf 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -60,8 +60,8 @@ jobs: with: filename: cobertura.xml badge: true - fail_below_min: false - thresholds: '80 85' + fail_below_min: true + thresholds: '50 85' output: both format: markdown From cf0a6b010470cf9a5ec93a4e84b1ae2edd860067 Mon Sep 17 00:00:00 2001 From: colemanirby Date: Mon, 24 Feb 2025 10:19:19 -0600 Subject: [PATCH 30/30] removing reference to cki/code-coverage branch --- .github/workflows/rust.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 2827caf..a815ddc 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - cki/code-coverage pull_request: branches: - main