Skip to content

Commit 1f7e760

Browse files
committed
Add codecov coverage report
1 parent 90bea4a commit 1f7e760

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

.github/workflows/coverage.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: coverage
2+
on: [push]
3+
4+
jobs:
5+
test:
6+
name: coverage
7+
runs-on: ubuntu-latest
8+
container:
9+
image: xd009642/tarpaulin
10+
options: --security-opt seccomp=unconfined
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v2
14+
15+
- name: Generate code coverage
16+
run: |
17+
cargo tarpaulin --verbose --features lua53,vendored,async,send,serialize --out xml --exclude-files benches --exclude-files tests --exclude-files build --exclude-files src/ffi
18+
19+
- name: Upload to codecov.io
20+
uses: codecov/codecov-action@v1
21+
with:
22+
token: ${{secrets.CODECOV_TOKEN}}
23+
fail_ci_if_error: true

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# mlua
2-
[![Build Status]][github-actions] [![Latest Version]][crates.io] [![API Documentation]][docs.rs]
2+
[![Build Status]][github-actions] [![Latest Version]][crates.io] [![API Documentation]][docs.rs] [![Coverage Status]][codecov.io]
33

44
[Build Status]: https://github.com/khvzak/mlua/workflows/CI/badge.svg
55
[github-actions]: https://github.com/khvzak/mlua/actions
66
[Latest Version]: https://img.shields.io/crates/v/mlua.svg
77
[crates.io]: https://crates.io/crates/mlua
88
[API Documentation]: https://docs.rs/mlua/badge.svg
99
[docs.rs]: https://docs.rs/mlua
10+
[Coverage Status]: https://codecov.io/gh/khvzak/mlua/branch/master/graph/badge.svg?token=99339FS1CG
11+
[codecov.io]: https://codecov.io/gh/khvzak/mlua
1012

1113
[Guided Tour](examples/guided_tour.rs)
1214

0 commit comments

Comments
 (0)