Repository navigation
142 lines (120 loc) · 4 KB
/
Copy pathtesting.yml
File metadata and controls
142 lines (120 loc) · 4 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
name: Kazoo Awesome Testing
on:
push:
branches:
- master
- release/*
pull_request:
branches:
- master
- release/*
jobs:
validate:
name: Code Validation
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.12"
pip-version: "25.1" # Minimum version required for PEP 735 --group support
cache: pip
- name: Install required dependencies
run: |
pip install 'tox>=4.22' # Match the requirement in tox.ini
- name: Code check
run: tox -e ${TOX_VENV}
env:
TOX_VENV: ruff,mypy
RUFF_OUTPUT_FORMAT: github
test:
needs: [validate]
name: >
Linux - Test Python ${{ matrix.python-version }},
ZK ${{ matrix.zk-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "pypy-3.11-v7.3.21"]
# Friendly note: If you change the minimum zk-version here, update it in
# ensure-zookeeper-env.sh. Additionally, if you need to change the way that
# zookeeper is installed, do it THERE. Not in the 'test with tox' step here.
# That way, people trying to test changes have a reasonable chance of getting
# things to work properly before submitting a PR.
zk-version: ["3.6.4", "3.7.2", "3.8.3", "3.9.1"]
include:
- python-version: "3.9"
tox-env: py39
- python-version: "3.10"
tox-env: py310
- python-version: "3.11"
tox-env: py311
- python-version: "3.12"
tox-env: py312
- python-version: "3.13"
tox-env: py313
- python-version: "3.14"
tox-env: py314
- python-version: "pypy-3.11-v7.3.21"
tox-env: pypy3
steps:
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
pip-version: "25.1" # Minimum version required for PEP 735 --group support
cache: pip
- name: Handle ZK installation cache
uses: actions/cache@v6
with:
path: zookeeper
key: zookeeper-${{ matrix.zk-version }}
enableCrossOsArchive: true
- name: Install required dependencies
run: |
sudo apt-get update
sudo apt-get -y install libevent-dev krb5-kdc krb5-admin-server libkrb5-dev
pip install 'tox>=4.22' # Match the requirement in tox.ini
- name: Test with tox
run: tox -e ${TOX_VENV}
env:
TOX_VENV: ${{ format('{0}-{1}', matrix.tox-env, 'gevent-eventlet-sasl') }}
ZOOKEEPER_VERSION: ${{ matrix.zk-version }}
- name: Publish Codecov report
uses: codecov/codecov-action@v7
test_windows:
needs: [validate]
name: Windows - Sanity test using a single version of Python and ZK
runs-on: windows-latest
env:
ZOOKEEPER_VERSION: "3.9.1"
PYTHON_VERSION: "3.12"
TOX_ENV: "py312"
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
pip-version: "25.1" # Minimum version required for PEP 735 --group support
python-version: ${{ env.PYTHON_VERSION }}
cache: pip
- name: Handle ZK installation cache
uses: actions/cache@v6
with:
path: zookeeper
key: zookeeper-${{ env.ZOOKEEPER_VERSION }}
enableCrossOsArchive: true
- name: Setup Java
uses: actions/setup-java@v6
with:
distribution: 'temurin'
java-version: '17'
- name: Install required dependencies
run: |
pip install 'tox>=4.22' # Match the requirement in tox.ini
- name: Test with tox
run: tox -e ${{ env.TOX_ENV }}
shell: bash