-
-
Notifications
You must be signed in to change notification settings - Fork 322
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up code coverage properly (#740)
* code coverage improvement testing Signed-off-by: clux <sszynrae@gmail.com> * codecov action Signed-off-by: clux <sszynrae@gmail.com> * try newer k3d action Signed-off-by: clux <sszynrae@gmail.com> * wtf Signed-off-by: clux <sszynrae@gmail.com> * get coverage running above 55 still not getting all the results i want because some ignored tests are not running Signed-off-by: clux <sszynrae@gmail.com> * remove duplicate instructions and leftovers Signed-off-by: clux <sszynrae@gmail.com> * fmt + comment Signed-off-by: clux <sszynrae@gmail.com> * simplify (tarpaulin does not inject features in workspaces anyway) Signed-off-by: clux <sszynrae@gmail.com> * fix test feature requirement Signed-off-by: clux <sszynrae@gmail.com> * need to move cfg limit before module Signed-off-by: clux <sszynrae@gmail.com> * try running doc tests as well Signed-off-by: clux <sszynrae@gmail.com> * try using nightly for tarpaulin doc test runner Signed-off-by: clux <sszynrae@gmail.com> * try with two runs of tarpaulin Signed-off-by: clux <sszynrae@gmail.com> * simplified with one-pass on stable Signed-off-by: clux <sszynrae@gmail.com> * test 3 core methods Signed-off-by: clux <sszynrae@gmail.com> * import parts of dynamic api example as discovery tests Signed-off-by: clux <sszynrae@gmail.com> * remove accidentally left-in flags Signed-off-by: clux <sszynrae@gmail.com> * revert pointless change in core_methods Signed-off-by: clux <sszynrae@gmail.com>
- Loading branch information
Showing
7 changed files
with
154 additions
and
40 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Coverage | ||
|
||
on: | ||
push: | ||
#branches: | ||
# - master | ||
|
||
jobs: | ||
rust: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
- uses: Swatinem/rust-cache@v1 | ||
- uses: AbsaOSS/k3d-action@v2 | ||
name: "Create Single Cluster" | ||
with: | ||
cluster-name: "test-cluster-1" | ||
args: >- | ||
--agents 1 | ||
--image docker.io/rancher/k3s:v1.22.4-k3s1 | ||
--k3s-arg "--no-deploy=traefik,servicelb,metrics-server@server:*" | ||
- name: Run cargo-tarpaulin | ||
uses: actions-rs/tarpaulin@v0.1 | ||
with: | ||
version: '0.18.5' | ||
out-type: Xml | ||
args: ' -- --test-threads 1' | ||
- uses: codecov/codecov-action@v2 |
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Usage cargo tarpaulin -- --test-threads 1 | ||
|
||
[one_pass_coverage] | ||
workspace = true | ||
features = "kube/derive kube/runtime" | ||
color = "Always" | ||
ignored = true | ||
timeout = "600s" | ||
exclude = ["integration"] | ||
# NB: skipping Doctests because they are slow to build and generally marked no_run | ||
run-types = ["Tests"] | ||
generate = ["Json"] |