mirror of
https://github.com/mandiant/capa.git
synced 2025-12-12 15:49:46 -08:00
ci: add test workflow for binja testing
This commit is contained in:
40
.github/workflows/bn-tests.yml
vendored
Normal file
40
.github/workflows/bn-tests.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: CI (BN)
|
||||
|
||||
on:
|
||||
push:
|
||||
# TODO: change this
|
||||
branches: [ binja-ci ]
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
name: Tests in ${{ matrix.python-version }} on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-20.04]
|
||||
# across all operating systems
|
||||
python-version: ["3.7", "3.11"]
|
||||
steps:
|
||||
- name: Checkout capa with submodules
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install pyyaml
|
||||
run: sudo apt-get install -y libyaml-dev
|
||||
- name: Install capa
|
||||
run: pip install -e .[dev]
|
||||
|
||||
- name: install Binary Ninja
|
||||
run: |
|
||||
mkdir ./.github/binja
|
||||
curl https://raw.githubusercontent.com/Vector35/binaryninja-api/6812c97/scripts/download_headless.py -O ./.github/binja/download_headless.py
|
||||
python ./.github/binja/download_headless.py --serial $BN_SERIAL --output .github/binja/BinaryNinja-headless.zip
|
||||
unzip .github/binja/BinaryNinja-headless.zip -d .github/binja/
|
||||
python .github/binja/binaryninja/scripts/install_api.py
|
||||
- name: Run tests
|
||||
run: pytest -v tests/test_binja_features.py
|
||||
Reference in New Issue
Block a user