forked from aptos-labs/aptos-core
-
Notifications
You must be signed in to change notification settings - Fork 3
67 lines (64 loc) · 2.43 KB
/
coverage-move-only.yaml
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
name: "Test Coverage For Move"
on:
# Trigger if any of the conditions
# Any changes to the directory `third_party/move/`
push:
branches:
- 'main'
paths:
- 'third_party/move/**'
- 'aptos-move/e2e-move-tests/**'
- 'aptos-move/framework/**'
- '.github/workflows/coverage-move-only.yaml'
pull_request:
paths:
- 'third_party/move/**'
- 'aptos-move/e2e-move-tests/**'
- 'aptos-move/framework/**'
- '.github/workflows/coverage-move-only.yaml'
env:
CARGO_INCREMENTAL: "0"
CARGO_TERM_COLOR: always
# cancel redundant builds
concurrency:
# cancel redundant builds on PRs (only on PR, not on branches)
group: ${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.ref) || github.sha }}
cancel-in-progress: true
jobs:
rust-move-unit-coverage:
timeout-minutes: 60
runs-on: high-perf-docker
steps:
- uses: actions/checkout@v3
- uses: aptos-labs/aptos-core/.github/actions/rust-setup@main
- name: prepare move lang prover tooling.
shell: bash
run: |
echo 'Z3_EXE='/home/runner/bin/z3 | tee -a $GITHUB_ENV
echo 'CVC5_EXE='/home/runner/bin/cvc5 | tee -a $GITHUB_ENV
echo 'DOTNET_ROOT='/home/runner/.dotnet/ | tee -a $GITHUB_ENV
echo 'BOOGIE_EXE='/home/runner/.dotnet/tools/boogie | tee -a $GITHUB_ENV
echo 'MVP_TEST_ON_CI'='1' | tee -a $GITHUB_ENV
echo "/home/runner/bin" | tee -a $GITHUB_PATH
echo "/home/runner/.dotnet" | tee -a $GITHUB_PATH
echo "/home/runner/.dotnet/tools" | tee -a $GITHUB_PATH
- run: rustup component add llvm-tools-preview
- uses: taiki-e/install-action@6f1ebcd9e21315fc37d7f7bc851dfcc8356d7da3 # [email protected]
with:
tool: nextest,cargo-llvm-cov
- run: docker run --detach -p 5432:5432 cimg/postgres:14.2
- run: cargo llvm-cov --ignore-run-fail -p aptos-framework -p "move*" --lcov --jobs 32 --output-path lcov_unit.info
env:
INDEXER_DATABASE_URL: postgresql://postgres@localhost/postgres
- uses: actions/upload-artifact@v3
with:
name: lcov_unit
path: lcov_unit.info
- uses: actions/download-artifact@v3
with:
name: lcov_unit
- name: Upload coverage to Codecov
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # pin@v3
with:
files: lcov_unit.info
fail_ci_if_error: true