-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (34 loc) · 906 Bytes
/
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
name: Rust
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
#container:
# image: centos8
steps:
- uses: dtolnay/rust-toolchain@1.69.0
- uses: actions/checkout@v3
- name: Preparing
run: sudo apt update && sudo apt install -y libxen-dev protobuf-compiler
- name: Build
run: cargo build --verbose
- name: Code coverage
uses: actions-rs/tarpaulin@v0.1.0
with:
version: "0.22.0"
args: '-- -p xcp-metrics-common xcp-metrics'
- name: Upload to codecov.io
uses: codecov/codecov-action@v1.0.2
with:
token: ${{secrets.CODECOV_TOKEN}}
- name: Archive code coverage results
uses: actions/upload-artifact@v1
with:
name: code-coverage-report
path: cobertura.xml
- name: Run tests
run: cargo test --verbose