From 58c2bf26c276b716b8074cfe5d5afa0036627274 Mon Sep 17 00:00:00 2001 From: Masanori Suda Date: Mon, 9 Mar 2026 22:25:06 +0900 Subject: [PATCH 1/2] feat(ci): add backend codecov workflow Refs #277 Instruction by: @MasanoriSuda Generated by: Codex --- .github/workflows/backend-coverage.yml | 66 ++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/workflows/backend-coverage.yml diff --git a/.github/workflows/backend-coverage.yml b/.github/workflows/backend-coverage.yml new file mode 100644 index 0000000..7505fc8 --- /dev/null +++ b/.github/workflows/backend-coverage.yml @@ -0,0 +1,66 @@ +name: Backend Coverage + +on: + push: + branches: + - main + - develop + - feature/** + paths: + - .github/workflows/backend-coverage.yml + - virtual-voicebot-backend/** + pull_request: + paths: + - .github/workflows/backend-coverage.yml + - virtual-voicebot-backend/** + +jobs: + backend-coverage: + runs-on: ubuntu-latest + permissions: + contents: read + defaults: + run: + working-directory: virtual-voicebot-backend + env: + CARGO_TERM_COLOR: always + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + components: llvm-tools-preview + + - name: Cache Cargo registry + target + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + virtual-voicebot-backend/target + key: ${{ runner.os }}-cargo-coverage-${{ hashFiles('virtual-voicebot-backend/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-coverage- + ${{ runner.os }}-cargo- + + - name: Show Rust version + run: rustc -V && cargo -V + + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + + - name: Generate backend coverage + run: cargo llvm-cov --workspace --all-features --lcov --output-path lcov.info + + - name: Upload coverage to Codecov + if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./virtual-voicebot-backend/lcov.info + flags: backend + name: backend-rust-coverage + fail_ci_if_error: true From 641190945d6bb923521de573d5f6acc011187ee3 Mon Sep 17 00:00:00 2001 From: Masanori Suda Date: Mon, 9 Mar 2026 22:41:29 +0900 Subject: [PATCH 2/2] =?UTF-8?q?#277=20coderabbit=E6=8C=87=E6=91=98?= =?UTF-8?q?=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/backend-coverage.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/backend-coverage.yml b/.github/workflows/backend-coverage.yml index 7505fc8..12a47ab 100644 --- a/.github/workflows/backend-coverage.yml +++ b/.github/workflows/backend-coverage.yml @@ -5,7 +5,6 @@ on: branches: - main - develop - - feature/** paths: - .github/workflows/backend-coverage.yml - virtual-voicebot-backend/** @@ -27,15 +26,15 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable + uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 with: components: llvm-tools-preview - name: Cache Cargo registry + target - uses: actions/cache@v4 + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 with: path: | ~/.cargo/registry @@ -50,14 +49,14 @@ jobs: run: rustc -V && cargo -V - name: Install cargo-llvm-cov - uses: taiki-e/install-action@cargo-llvm-cov + uses: taiki-e/install-action@03e268b84870ac3cfa58a44d9b504511b732a857 - name: Generate backend coverage run: cargo llvm-cov --workspace --all-features --lcov --output-path lcov.info - name: Upload coverage to Codecov if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de with: token: ${{ secrets.CODECOV_TOKEN }} files: ./virtual-voicebot-backend/lcov.info