-
Notifications
You must be signed in to change notification settings - Fork 30
45 lines (35 loc) · 1.07 KB
/
python.yml
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
# This workflow will generate a Python protobuf bindings and type stubs with Maven and run Python tests.
name: Python CI with Maven and Pytest
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
jobs:
run-python-ci:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Generate Python bindings with Maven
run: ./mvnw -B package -DskipTests # we run tests elsewhere
- name: Install Python bindings
run: |
cd python && python3 -m pip install .[test]
- name: Run Python tests
run: |
cd python && pytest