This is an automated email from the ASF dual-hosted git repository.

github-merge-queue[bot] pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion-sqlparser-rs.git


The following commit(s) were added to refs/heads/main by this push:
     new 2d577237d CI: Add Codecov coverage job with cargo-llvm-cov (#2565)
2d577237d is described below

commit 2d577237d7aaebcf22c41f84b4d10d8b442f1949
Author: Luca Cappelletti <[email protected]>
AuthorDate: Wed Sep 23 20:44:12 2026 +0000

    CI: Add Codecov coverage job with cargo-llvm-cov (#2565)
---
 .asf.yaml                  |  1 +
 .github/workflows/rust.yml | 30 ++++++++++++++++++++++++++++--
 README.md                  |  2 +-
 codecov.yml                | 19 +++++++++++++++++++
 4 files changed, 49 insertions(+), 3 deletions(-)

diff --git a/.asf.yaml b/.asf.yaml
index 08b31804d..e5cb0af69 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -49,6 +49,7 @@ github:
           - "test (stable)"
           - "test (beta)"
           - "test (nightly)"
+          - "coverage"
           - "Release Audit Tool (RAT)"
   pull_requests:
     # enable updating head branches of pull requests
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index d0913cd81..98f803699 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -102,7 +102,33 @@ jobs:
       with:
         rust-version: ${{ matrix.rust }}
     - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # 
v2.7.8
-    - name: Install Tarpaulin
-      run: cargo install cargo-tarpaulin
     - name: Test
       run: cargo test --all-features
+
+  coverage:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+        with:
+          fetch-depth: 0
+      - name: Setup Rust Toolchain
+        uses: ./.github/actions/setup-builder
+      - run: rustup component add llvm-tools-preview
+      - uses: taiki-e/install-action@7623a79cdfecb99d681017af368ca353d9f49bb5 
# v2.87.19
+        with:
+          tool: cargo-llvm-cov
+      - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # 
v2.7.8
+      - run: cargo llvm-cov --all-features --no-report
+      - run: cargo llvm-cov report --codecov --output-path target/codecov.json
+      - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 
# v7.1.1
+        with:
+          files: target/codecov.json
+          fail_ci_if_error: false
+          token: ${{ secrets.CODECOV_TOKEN }}
+      - run: cargo llvm-cov report --summary-only --fail-under-lines 90
+      - name: Changed lines must be covered
+        if: github.event_name == 'pull_request'
+        run: |
+          cargo llvm-cov report --lcov --output-path target/lcov.info
+          pipx run --spec diff-cover==10.6.0 diff-cover target/lcov.info \
+            --compare-branch ${{ github.event.pull_request.base.sha }} 
--fail-under 80
diff --git a/README.md b/README.md
index 775d07491..28c4b78d4 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,7 @@
 
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
 
[![Version](https://img.shields.io/crates/v/sqlparser.svg)](https://crates.io/crates/sqlparser)
 [![Build 
Status](https://github.com/apache/datafusion-sqlparser-rs/actions/workflows/rust.yml/badge.svg)](https://github.com/sqlparser-rs/sqlparser-rs/actions?query=workflow%3ARust+branch%3Amain)
-[![Coverage 
Status](https://coveralls.io/repos/github/sqlparser-rs/sqlparser-rs/badge.svg?branch=main)](https://coveralls.io/github/sqlparser-rs/sqlparser-rs?branch=main)
+[![codecov](https://codecov.io/gh/apache/datafusion-sqlparser-rs/branch/main/graph/badge.svg)](https://codecov.io/gh/apache/datafusion-sqlparser-rs)
 [![Gitter 
Chat](https://badges.gitter.im/sqlparser-rs/community.svg)](https://gitter.im/sqlparser-rs/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
 
 This crate contains a lexer and parser for SQL that conforms with the
diff --git a/codecov.yml b/codecov.yml
new file mode 100644
index 000000000..eda355141
--- /dev/null
+++ b/codecov.yml
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+codecov:
+  branch: main


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to