Skip to content

tests: upgraded tarpaulin and added derive macro coverage #2227

tests: upgraded tarpaulin and added derive macro coverage

tests: upgraded tarpaulin and added derive macro coverage #2227

Workflow file for this run

name: coverage
on:
push:
branches:
- main
pull_request:
paths:
- '**.rs'
- '**.toml'
- '**.yml'
jobs:
tarpaulin-codecov:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
# - name: Install tarpaulin
# uses: taiki-e/install-action@v2
# with:
# tool: cargo-tarpaulin
- name: Install tarpaulin # Use dev tarpaulin from git repo for now, until it's pushed to release
run: |
rustup run stable cargo install --git https://github.com/xd009642/tarpaulin.git --rev 2b05ebd4f809eeeeb590f68efb8e62758eb59214 cargo-tarpaulin
- uses: AbsaOSS/k3d-action@v2
name: "Create Single Cluster"
with:
cluster-name: "test-cluster-1"
args: >-
--image docker.io/rancher/k3s:v1.24.4-k3s1
-p 10250:10250
--k3s-arg "--no-deploy=traefik,servicelb,metrics-server@server:*"
- name: Run cargo-tarpaulin
run: |
rustup run stable cargo tarpaulin -o xml --skip-clean
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3