-
Notifications
You must be signed in to change notification settings - Fork 3.7k
70 lines (67 loc) · 2.63 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
68
69
70
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: runs-on,cpu=64,family=c7,hdd=500,image=aptos-ubuntu-x64,run-id=${{ github.run_id }}
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@4fedbddde88aab767a45a011661f832d68202716 # pin@v2.33.28
with:
tool: nextest,cargo-llvm-cov
- run: docker run --detach -p 5432:5432 cimg/postgres:14.2
- run: cargo llvm-cov nextest --lcov --output-path lcov_unit.info --ignore-run-fail -p aptos-framework -p "move*"
env:
INDEXER_DATABASE_URL: postgresql://postgres@localhost/postgres
- uses: actions/upload-artifact@v4
with:
name: lcov_unit
path: lcov_unit.info
- uses: actions/download-artifact@v4
with:
name: lcov_unit
- name: Upload coverage to Codecov
continue-on-error: true # Don't fail if the codecov upload fails
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # pin@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: lcov_unit.info
fail_ci_if_error: true