Skip to content

Merge pull request #137 from quarkslab/dependabot/github_actions/acti… #26

Merge pull request #137 from quarkslab/dependabot/github_actions/acti…

Merge pull request #137 from quarkslab/dependabot/github_actions/acti… #26

Workflow file for this run

name: BinaryNinja Extension
on:
push:
branches:
- main
paths:
- "binaryninja_extension/**"
- "proto/**"
- ".github/workflows/binaryninja.yml"
pull_request:
branches: ["**"]
paths:
- "binaryninja_extension/**"
- "proto/**"
- ".github/workflows/binaryninja.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
binaryninja-test:
name: "Check generated protobuf and test BinaryNinja extension"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
python-version: '3.12'
enable-cache: false
activate-environment: true
- name: Install codegen and test dependencies
run: uv pip install -r binaryninja_extension/requirements-dev.txt pytest
- name: Regenerate quokka_pb2.py with the pinned toolchain
run: python binaryninja_extension/generate_proto.py
- name: Check the committed generated module is up to date
run: |
git diff --exit-code -- binaryninja_extension/bn_quokka/quokka_pb2.py || {
echo "::error::binaryninja_extension/bn_quokka/quokka_pb2.py is stale." \
"Regenerate it with binaryninja_extension/generate_proto.py" \
"using the grpcio-tools version pinned in binaryninja_extension/requirements-dev.txt."
exit 1
}
- name: Run extension tests
run: python -m pytest binaryninja_extension/tests/ -v