Install the latest version of Protobuf using these instructions.
pip3 install -r requirements.txt
sudo chmod +x compile_proto
./compile_proto
name: Python Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: pip3 install -r requirements.txt | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v2 | |
with: | |
version: "25.2" | |
- name: Compile Protobuf | |
run: ./compile_proto | |
- name: Run tests | |
run: ./test |
Install the latest version of Protobuf using these instructions.
pip3 install -r requirements.txt
sudo chmod +x compile_proto
./compile_proto
#!/bin/bash | |
plugin=$(which protoc-gen-mypy) | |
compile_proto() { | |
protoc --experimental_allow_proto3_optional --plugin=protoc-gen-mypy=$plugin --python_out=. --mypy_out=. $@ | |
} | |
compile_proto *.proto | |
compile_proto **/*.proto |
mypy | |
mypy-protobuf | |
protobuf | |
pyzmq | |
types-protobuf |