-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (64 loc) · 2.05 KB
/
test.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
62
63
64
65
66
67
68
69
70
71
72
---
name: Test
on:
pull_request:
paths-ignore:
- "docs/**"
push:
paths-ignore:
- "docs/**"
branches:
- master
- "v*.*.*"
jobs:
cleanup-runs:
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'"
test-all:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
# warn when test takes more than 3s, kill after 6s
RUST_TEST_TIME_UNIT: "3000,6000"
RUST_TEST_TIME_INTEGRATION: "3000,6000"
RUST_TEST_TIME_DOCTEST: "3000,6000"
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/deps
with:
toolchain: nightly
- name: Test tenderdash-proto
shell: bash
timeout-minutes: 6
run: cargo test --all-features -p tenderdash-proto -- -Zunstable-options --ensure-time
- name: Test tenderdash-abci
shell: bash
timeout-minutes: 6
env:
RUSTFLAGS: "-Cinstrument-coverage"
LLVM_PROFILE_FILE: "%p-%m.profraw"
run: cargo test --all-features -p tenderdash-abci -- -Zunstable-options --ensure-time
- name: Emit docker logs on error
if: failure()
shell: bash
run: docker logs tenderdash > tenderdash.log 2>&1
- name: Archive docker logs
uses: actions/upload-artifact@v1
if: failure()
with:
name: tenderdash.log
path: tenderdash.log
- name: Install grcov
run: |
rustup component add llvm-tools-preview
curl -L https://github.com/mozilla/grcov/releases/download/v0.8.13/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf -
- name: Run grcov
run: |
./grcov . --source-dir . --binary-path ./target/debug/ --output-type lcov --output-path ./lcov.info --branch --ignore-not-existing
- name: Upload to Codecov
run: |
bash <(curl -s https://codecov.io/bash) -f ./lcov.info