-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (47 loc) · 1.2 KB
/
tests.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
name: Tests
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
ubuntu_test:
strategy:
fail-fast: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Install rust
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: llvm-tools-preview
# Cache tests
- uses: actions/cache@v3
with:
path: ./target/llvm-cov-target
key: llvm-cov-key
# Cache rust
- uses: Swatinem/rust-cache@v2
# Install cargo make
- uses: davidB/rust-cargo-make@v1
# Install llvm-cov
- uses: taiki-e/install-action@cargo-llvm-cov
# Install nextest
- uses: taiki-e/install-action@nextest
# Prepare server
- name: Start server
run: |
cargo build --bin metrsd
cargo make run-daemon -- --hosts tcp://0.0.0.0:8080 &
sleep 10
# Prepare CI
- name: Run tests
run: cargo make covgen
# Upload it to codecov
- name: Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./lcov.info
flags: unittests # optional
verbose: true # optional (default = false)