-
Notifications
You must be signed in to change notification settings - Fork 15
40 lines (31 loc) · 1 KB
/
build-protobufs-python.yml
File metadata and controls
40 lines (31 loc) · 1 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
name: Build OpenSearch Protobufs PYTHON Artifacts
on:
pull_request:
jobs:
build-protobufs-python:
runs-on: ubuntu-latest
if: github.repository == 'opensearch-project/opensearch-protobufs'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
- name: Run unit tests
run: |
cd tools
python -m pytest test_generate_init_files.py -v --tb=short
- name: Build Python protobufs
run: bazel build //:python_protos_all
- name: Test Python imports
run: |
# Create virtual environment for testing
python -m venv test_env
source test_env/bin/activate
pip install grpcio protobuf
# Run the dedicated test script
export PYTHONPATH=bazel-bin
python tools/python/print_modules.py