Merge pull request #2 from smrpn/badges
ft: Add GitHub Actions CI badge, code coverage badge and semantic-release
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
new file mode 100644
index 0000000..a86e68a
--- /dev/null
+++ b/.github/workflows/coverage.yml
@@ -0,0 +1,35 @@
+name: Coverage
+
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+ branches:
+ - main
+
+jobs:
+ cover:
+ name: Auto Codecov Coverage
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout Repository
+ uses: actions/checkout@master
+
+ - name: Install Rust toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ profile: minimal
+ toolchain: stable
+ override: true
+
+ - name: Run cargo-tarpaulin
+ uses: actions-rs/tarpaulin@v0.1
+ with:
+ args: --out Xml
+
+ - name: Upload to codecov.io
+ uses: codecov/codecov-action@v1
+ with:
+ token: ${{secrets.CODECOV_TOKEN}}
diff --git a/README.md b/README.md
index b0c0f7c..ef52ada 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,8 @@
# json-adapter
+[](https://github.com/casbin-rs/json-adapter/actions)
+[](https://codecov.io/gh/casbin-rs/json-adapter)
+
Json Adapter is a [json](https://github.com/serde-rs/json) adapter for [Casbin-rs](https://github.com/casbin/casbin-rs). With this library, Casbin can load policy from json format file or save policy into it with fully asynchronous support.
## Dependency