-
Notifications
You must be signed in to change notification settings - Fork 29
98 lines (85 loc) · 2.59 KB
/
Copy pathcoverage.yml
File metadata and controls
98 lines (85 loc) · 2.59 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Coverage
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main
concurrency:
group: coverage-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
coverage:
runs-on: ubuntu-22.04
permissions:
contents: read
id-token: write
services:
ydb:
image: ydbplatform/local-ydb:24.4
ports:
- 2135:2135
- 2136:2136
- 8765:8765
volumes:
- /tmp/ydb_certs:/ydb_certs
env:
YDB_LOCAL_SURVIVE_RESTART: true
YDB_USE_IN_MEMORY_PDISKS: true
YDB_TABLE_ENABLE_PREPARED_DDL: true
options: '-h localhost'
steps:
- name: Checkout PR
uses: actions/checkout@v4
if: github.event.pull_request.head.sha != ''
with:
submodules: true
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout
uses: actions/checkout@v4
if: github.event.pull_request.head.sha == ''
with:
submodules: true
- name: Install dependencies
uses: ./.github/actions/prepare_vm
- name: Configure and build with coverage
shell: bash
run: |
mkdir -p build
rm -rf build/*
cmake --preset coverage-test-gcc
cmake --build build -j"$(nproc)"
- name: Test
shell: bash
run: |
set -euo pipefail
IAM_REGEX='^(DriverAuth|TMetadataFixture|TJwtIamFixture|TOAuthIamFixture|OAuth_WithFacility)\.'
FLAKY_REGEX='(ManyMessages|DiscoveryHang|DescribeHang)'
EXCLUDE_REGEX="${IAM_REGEX}|${FLAKY_REGEX}"
ctest -j1 --preset coverage-all -E "${EXCLUDE_REGEX}" --output-on-failure
IAM_CTEST_JOBS=1 ./.github/scripts/run_iam_integration_tests.sh
- name: Generate coverage report
uses: ./.github/actions/gcovr
with:
build-directory: build
source-root: ${{ github.workspace }}
gcov-executable: gcov-13
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
use_oidc: true
files: build/coverage/coverage-codecov.lcov
disable_search: true
plugins: noop
flags: sdk
name: ydb-cpp-sdk
fail_ci_if_error: true
verbose: true
- name: Upload coverage reports
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: build/coverage/
retention-days: 14