-
-
Notifications
You must be signed in to change notification settings - Fork 6
61 lines (58 loc) · 1.67 KB
/
rust.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: git-lfs-ipfs
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: cargo build
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install IFPS
run: |
sudo snap install ipfs
- name: Configure and start IPFS daemon
run: |
ipfs init --profile server
ipfs daemon&
- uses: actions-rs/toolchain@v1
name: Install nightly Rust toolchain with llvm-tools-preview
with:
toolchain: nightly
override: true
profile: minimal
components: llvm-tools-preview
- uses: actions-rs/[email protected]
name: Install grcov
with:
crate: grcov
version: 0.8.0
use-tool-cache: true
- uses: actions-rs/cargo@v1
name: Build crates with coverage instrumentation
with:
command: build
env:
RUSTFLAGS: '-Zinstrument-coverage'
RUSTDOCFLAGS: '-Zinstrument-coverage'
- uses: actions-rs/cargo@v1
name: Run tests
with:
command: test
args: --all-features --no-fail-fast -- --include-ignored
env:
RUSTFLAGS: '-Zinstrument-coverage'
RUSTDOCFLAGS: '-Zinstrument-coverage'
LLVM_PROFILE_FILE: 'codecov-instrumentation-%p-%m.profraw'
- name: grcov
run: grcov . -s . --binary-path ./target/debug/ -t lcov --branch -o lcov.info
- uses: codecov/codecov-action@v1
with:
token: ${{secrets.CODECOV_TOKEN}}