chore!: Update kube v0.98, k8s-openapi v0.24, MSRV v1.81, MK8SV v1.28… #59
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code coverage report | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- main | |
- rel-v* | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
codecov: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup for testing | |
run: | | |
mkdir grcov | |
curl -sL https://github.com/mozilla/grcov/releases/latest/download/grcov-x86_64-unknown-linux-gnu.tar.bz2 | (cd grcov ; tar jxf -) | |
rustup toolchain add nightly --component llvm-tools-preview | |
rustup override set nightly | |
- uses: Swatinem/rust-cache@v2 | |
- uses: nolar/setup-k3d-k3s@v1 | |
with: | |
version: latest | |
k3d-name: kube | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
k3d-args: "--no-lb --no-rollback --k3s-arg --disable=traefik,servicelb,metrics-server@server:*" | |
- name: Test | |
env: | |
CI: true | |
RUSTFLAGS: -Cinstrument-coverage | |
LLVM_PROFILE_FILE: kube-lease-manager-%p-%m.profraw | |
RUST_LOG: kube_lease_manager=debug | |
run: cargo test --all -- --include-ignored | |
- name: Generate coverage | |
run: | | |
grcov/grcov $(find . -name "kube-lease-manager-*.profraw" -print) \ | |
--branch \ | |
--ignore-not-existing \ | |
--binary-path ./target/debug/ \ | |
-s src \ | |
-t lcov \ | |
--ignore "/*" \ | |
--excl-line '^\s*\.await\??;?$' --excl-br-line '^\s*\.await\??;?$' \ | |
-o lcov.info | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
file: ./lcov.info |