Unverified Commit 9e41304e authored by Copilot's avatar Copilot Committed by GitHub
Browse files

Add CI coverage job with cargo-llvm-cov and Codecov upload (#444)



* Initial plan

* ci: add coverage job

Co-authored-by: default avatarNugine <30099658+Nugine@users.noreply.github.com>

* ci: add codecov token

Co-authored-by: default avatarNugine <30099658+Nugine@users.noreply.github.com>

* ci: make codecov upload conditional

Co-authored-by: default avatarNugine <30099658+Nugine@users.noreply.github.com>

* ci: pin coverage tooling actions

Co-authored-by: default avatarNugine <30099658+Nugine@users.noreply.github.com>

* fix

---------

Co-authored-by: default avatarcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: default avatarNugine <30099658+Nugine@users.noreply.github.com>
Co-authored-by: default avatarNugine <nugine@foxmail.com>
parent f6198bbf
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -90,6 +90,24 @@ jobs:
          cd crates/s3s-wasm
          wasm-pack test --node

  coverage:
    needs: skip-check
    if: needs.skip-check.outputs.should_skip != 'true'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: dtolnay/rust-toolchain@nightly
      - uses: Swatinem/rust-cache@v2
      - uses: taiki-e/install-action@just
      - uses: taiki-e/install-action@cargo-llvm-cov
      - run: |
          cargo llvm-cov -p s3s --all-features --codecov --output-path target/codecov.json
      - uses: codecov/codecov-action@v5
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          files: target/codecov.json
          fail_ci_if_error: true

  mint-proxy-minio:
    name: e2e (mint, s3s-proxy, minio)
    needs: skip-check
+3 −0
Original line number Diff line number Diff line
@@ -34,6 +34,9 @@ codegen:
install name *ARGS:
    uv run ./scripts/install.py {{name}} {{ARGS}}

coverage *ARGS:
    cargo llvm-cov -p s3s --all-features --html {{ARGS}}

# ------------------------------------------------

sync-version: