Skip to content

Commit a1aa39a

Browse files
feat: add codecov (#72)
Co-authored-by: hanabi1224 <[email protected]>
1 parent 83ce914 commit a1aa39a

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

.github/workflows/codecov.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Code coverage
2+
concurrency:
3+
group: "${{ github.workflow }}-${{ github.ref }}"
4+
cancel-in-progress: "${{ github.ref != 'refs/heads/main' }}"
5+
"on":
6+
workflow_dispatch:
7+
merge_group:
8+
pull_request:
9+
branches:
10+
- main
11+
push:
12+
branches:
13+
- main
14+
15+
jobs:
16+
codedov:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: taiki-e/install-action@cargo-llvm-cov
21+
- run: cargo llvm-cov --all-features --lcov --output-path lcov.info
22+
env:
23+
RUSTC_WRAPPER:
24+
- uses: actions/upload-artifact@v4
25+
with:
26+
name: lcov.info
27+
path: lcov.info
28+
if-no-files-found: error
29+
- name: Upload to codecov
30+
env:
31+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
32+
run: |
33+
curl -Os https://uploader.codecov.io/latest/linux/codecov
34+
chmod +x codecov
35+
./codecov -f lcov.info -Z

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Forest Explorer
22

3+
[![codecov](https://codecov.io/github/ChainSafe/forest-explorer/graph/badge.svg?token=J2ZVD5FOEC)](https://codecov.io/github/ChainSafe/forest-explorer)
4+
35
Forest Explorer is a server-less inspector of the Filecoin blockchain.
46

57
# Implementation

0 commit comments

Comments
 (0)