Repository navigation
120 lines (99 loc) · 3.13 KB
/
Copy pathtests.yaml
File metadata and controls
120 lines (99 loc) · 3.13 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: Tests
on:
push:
branches:
- main
pull_request:
jobs:
integration:
runs-on: ubuntu-latest
concurrency:
group: integration-${{ github.ref }}-${{ matrix.python-version }}-${{ matrix.protobuf-version }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
protobuf-version: [proto3, proto4, proto5, proto6]
exclude:
# protobuf 4.x cannot be imported on Python 3.14: its C extension uses
# a metaclass with a custom tp_new, which 3.14 rejects. The 4.x line is
# EOL and won't get a fix, so skip just this cell.
- python-version: "3.14"
protobuf-version: proto4
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: |
python -m pip install --upgrade pip
pip install tox==4.2.6
- name: Run unit tests
run: tox -e py-${{ matrix.protobuf-version }} -- tests
unit:
runs-on: ubuntu-latest
concurrency:
group: unit-${{ github.ref }}-${{ matrix.python-version }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: |
python -m pip install --upgrade pip
pip install tox==4.2.6
- name: Run unit tests
run: tox -e py -- ydb
coverage:
runs-on: ubuntu-latest
concurrency:
group: coverage-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install tox
run: |
python -m pip install --upgrade pip
pip install tox==4.2.6
# sysmon (PEP 669) keeps tracer overhead low so timing-sensitive chaos
# tests (which kill/restart YDB) still pass under coverage. Requires py3.12+.
- name: Unit tests with coverage
env:
COVERAGE_CORE: sysmon
run: tox -e cov -- ydb
- name: Upload unit coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: unit
name: unit
# The gate is enforced via Codecov status checks (branch protection),
# so don't fail CI on transient upload errors.
fail_ci_if_error: false
- name: Integration tests with coverage
env:
COVERAGE_CORE: sysmon
run: tox -e cov -- tests
- name: Upload integration coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: integration
name: integration
fail_ci_if_error: false