diff options
| -rw-r--r-- | .github/workflows/coverage.yml | 44 | ||||
| -rw-r--r-- | codecov.yml | 42 |
2 files changed, 86 insertions, 0 deletions
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000..e1637d6 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,44 @@ +name: Coverage 🛌 + +on: + push: + paths: + - "src/**" + - "Cargo.toml" + pull_request: + paths: + - "src/**" + - "Cargo.toml" + +jobs: + coverage: + runs-on: ubuntu-20.04 + + steps: + - name: Checkout 🛒 + uses: actions/checkout@v2 + + - name: Toolchain 🧰 + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly-2021-02-20 + components: rustfmt, clippy + override: true + + - name: Tarpaulin ⛺ + uses: actions-rs/[email protected] + with: + version: '0.15.0' + args: '-- --test-threads 1' + + - name: Upload to Codecov ✈ + uses: codecov/[email protected] + with: + token: ${{ secrets.CODECOV_TOKEN }} + + - name: Archive Coverage Results 🗃 + uses: actions/upload-artifact@v1 + with: + name: code-coverage-report + path: cobertura.xml diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..bfd8bb7 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,42 @@ +# Before making changes to this file, please verify it validity with the +# following shell command; +# `cat codecov.yml | curl --data-binary @- https://codecov.io/validate`. + +codecov: + token: "secret:xGpGvas82nUNsQ5qjyZYJEjdBwsbX0E6m93vHgzlLSRfD1IVsVrlcQDYsb6ooJx4gEJcVN+UHpoHS6NOmLJF7LTiKEd7bdLgUNMkuKK78Rs=" + bot: "codecov-io" + strict_yaml_branch: "yaml-config" + max_report_age: 24 + disable_default_path_fixes: false + require_ci_to_pass: true + notify: + after_n_builds: 2 + wait_for_ci: true + +coverage: + range: 50..90 + round: nearest + precision: 2 + status: + project: + default: + target: auto + threshold: 0% + flags: + - unit + paths: + - "src/**" + if_ci_failed: error + informational: false + only_pulls: false + patch: false + +github_checks: + annotations: false + +comment: + layout: "reach, diff, flags, files" + behavior: default + require_changes: false + require_base: false + require_head: true |