From fc7f9eb847175b878d8746f843b6134679f16f94 Mon Sep 17 00:00:00 2001 From: Sobhe higaze Date: Thu, 12 Feb 2026 09:53:36 +0200 Subject: [PATCH 1/5] test --- .github/workflows/codecov.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/codecov.yml diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml new file mode 100644 index 00000000..1527e8a2 --- /dev/null +++ b/.github/workflows/codecov.yml @@ -0,0 +1,24 @@ +name: codecov + +on: + workflow_run: + workflows: ["check"] + types: [completed] + +jobs: + report: + if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request' + runs-on: namespace-profile-starkware-libs-proving-utils-small-ubuntu-24-04-amd64 + steps: + - name: "Download coverage report" + uses: dawidd6/action-download-artifact@v3 + with: + run_id: ${{ github.event.workflow_run.id }} + name: coverage-report + - name: "Upload to Codecov (optional)" + uses: codecov/codecov-action@v4 + with: + files: coverage/cobertura.xml + fail_ci_if_error: false + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file From 83a064710211a5e3bba3b765644828ad751bccaf Mon Sep 17 00:00:00 2001 From: Sobhe higaze Date: Thu, 12 Feb 2026 09:57:58 +0200 Subject: [PATCH 2/5] test --- .github/workflows/codecov.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 1527e8a2..5d8d3630 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -1,9 +1,11 @@ name: codecov + on: - workflow_run: - workflows: ["check"] - types: [completed] + push: + branches: + - main + pull_request: jobs: report: From 64e88fd15dc55c4a6e4544a0147565166dc2b816 Mon Sep 17 00:00:00 2001 From: Sobhe higaze Date: Thu, 12 Feb 2026 09:58:57 +0200 Subject: [PATCH 3/5] fix --- .github/workflows/codecov.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 5d8d3630..f934227c 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -9,7 +9,6 @@ on: jobs: report: - if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request' runs-on: namespace-profile-starkware-libs-proving-utils-small-ubuntu-24-04-amd64 steps: - name: "Download coverage report" From 706185c5fc7549244a57ca8b99373c8ea1827828 Mon Sep 17 00:00:00 2001 From: Sobhe higaze Date: Thu, 12 Feb 2026 10:08:15 +0200 Subject: [PATCH 4/5] test --- .github/workflows/check.yml | 16 ++++++++++++++-- .github/workflows/codecov.yml | 15 ++++++++------- codecov.yml | 21 +++++++++++++++++++++ 3 files changed, 43 insertions(+), 9 deletions(-) create mode 100644 codecov.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 5ceb1b6d..44fb27da 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -36,6 +36,9 @@ jobs: - run: rustup show - run: rustup toolchain install nightly-2025-07-14 --profile minimal - uses: Swatinem/rust-cache@v2 + - uses: taiki-e/install-action@v2 + with: + tool: cargo-tarpaulin - uses: actions/setup-python@v4 with: python-version: "3.11" @@ -47,13 +50,22 @@ jobs: haskell: true large-packages: false tool-cache: false - - name: "Unit tests" + - name: "Unit tests with coverage" run: | - cargo +nightly-2025-07-14 test --workspace --all-targets --all-features + mkdir -p coverage + cargo +nightly-2025-07-14 tarpaulin \ + --workspace --all-targets --all-features \ + --out Stdout --out Xml --output-dir coverage \ + --fail-under 0 - name: "Test examples" run: | cargo +nightly-2025-07-14 run --example run_program_with_simple_bl cargo +nightly-2025-07-14 run --example run_pie_object_with_simple_bl + - name: "Upload coverage report" + uses: actions/upload-artifact@v4 + with: + name: coverage-report + path: coverage/ udeps: runs-on: namespace-profile-starkware-libs-proving-utils-medium-ubuntu-24-04-amd64 diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index f934227c..906969a2 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -1,14 +1,15 @@ name: codecov - +# Run only after check completes (so we can download the coverage artifact). +# The job below runs only for successful check runs triggered by a PR. on: - push: - branches: - - main - pull_request: + workflow_run: + workflows: ["check"] + types: [completed] jobs: report: + if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request' runs-on: namespace-profile-starkware-libs-proving-utils-small-ubuntu-24-04-amd64 steps: - name: "Download coverage report" @@ -16,10 +17,10 @@ jobs: with: run_id: ${{ github.event.workflow_run.id }} name: coverage-report - - name: "Upload to Codecov (optional)" + - name: "Upload to Codecov" uses: codecov/codecov-action@v4 with: files: coverage/cobertura.xml fail_ci_if_error: false env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..1f501621 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,21 @@ +# Codecov configuration (used by Codecov app when processing uploads) +# https://docs.codecov.com/docs/codecov-yaml + +ignore: + - "crates/test_utils" + - "crates/**/*test*.rs" + +coverage: + status: + project: + default: + target: auto + threshold: 0% + informational: true + only_pulls: true + patch: + default: + target: 100% + threshold: 0% + informational: true + only_pulls: true From 2b89f9cbf8d53ad13253b621d0b6dd75b53e9c5c Mon Sep 17 00:00:00 2001 From: Sobhe higaze Date: Thu, 12 Feb 2026 10:57:46 +0200 Subject: [PATCH 5/5] test --- .github/.codecov.yml | 16 ++++++++++++++++ .github/workflows/check.yml | 16 ++-------------- .github/workflows/codecov.yml | 26 -------------------------- codecov.yml | 15 +++++---------- 4 files changed, 23 insertions(+), 50 deletions(-) create mode 100644 .github/.codecov.yml delete mode 100644 .github/workflows/codecov.yml diff --git a/.github/.codecov.yml b/.github/.codecov.yml new file mode 100644 index 00000000..07f48feb --- /dev/null +++ b/.github/.codecov.yml @@ -0,0 +1,16 @@ +ignore: + - "crates/**/*test*.rs" +coverage: + status: + project: + default: + target: auto # set the target coverage to the value of the parent commit + threshold: 10% # pct of drop in coverage that is still considered as success + informational: true # if true does not fail the CI is coverage is bellow the target value + only_pulls: true # run only on PRs + patch: + default: + target: 100% + threshold: 0% + informational: true + only_pulls: true \ No newline at end of file diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 44fb27da..5ceb1b6d 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -36,9 +36,6 @@ jobs: - run: rustup show - run: rustup toolchain install nightly-2025-07-14 --profile minimal - uses: Swatinem/rust-cache@v2 - - uses: taiki-e/install-action@v2 - with: - tool: cargo-tarpaulin - uses: actions/setup-python@v4 with: python-version: "3.11" @@ -50,22 +47,13 @@ jobs: haskell: true large-packages: false tool-cache: false - - name: "Unit tests with coverage" + - name: "Unit tests" run: | - mkdir -p coverage - cargo +nightly-2025-07-14 tarpaulin \ - --workspace --all-targets --all-features \ - --out Stdout --out Xml --output-dir coverage \ - --fail-under 0 + cargo +nightly-2025-07-14 test --workspace --all-targets --all-features - name: "Test examples" run: | cargo +nightly-2025-07-14 run --example run_program_with_simple_bl cargo +nightly-2025-07-14 run --example run_pie_object_with_simple_bl - - name: "Upload coverage report" - uses: actions/upload-artifact@v4 - with: - name: coverage-report - path: coverage/ udeps: runs-on: namespace-profile-starkware-libs-proving-utils-medium-ubuntu-24-04-amd64 diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml deleted file mode 100644 index 906969a2..00000000 --- a/.github/workflows/codecov.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: codecov - -# Run only after check completes (so we can download the coverage artifact). -# The job below runs only for successful check runs triggered by a PR. -on: - workflow_run: - workflows: ["check"] - types: [completed] - -jobs: - report: - if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request' - runs-on: namespace-profile-starkware-libs-proving-utils-small-ubuntu-24-04-amd64 - steps: - - name: "Download coverage report" - uses: dawidd6/action-download-artifact@v3 - with: - run_id: ${{ github.event.workflow_run.id }} - name: coverage-report - - name: "Upload to Codecov" - uses: codecov/codecov-action@v4 - with: - files: coverage/cobertura.xml - fail_ci_if_error: false - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/codecov.yml b/codecov.yml index 1f501621..07f48feb 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,21 +1,16 @@ -# Codecov configuration (used by Codecov app when processing uploads) -# https://docs.codecov.com/docs/codecov-yaml - ignore: - - "crates/test_utils" - "crates/**/*test*.rs" - coverage: status: project: default: - target: auto - threshold: 0% - informational: true - only_pulls: true + target: auto # set the target coverage to the value of the parent commit + threshold: 10% # pct of drop in coverage that is still considered as success + informational: true # if true does not fail the CI is coverage is bellow the target value + only_pulls: true # run only on PRs patch: default: target: 100% threshold: 0% informational: true - only_pulls: true + only_pulls: true \ No newline at end of file