6363 sudo apt install libjansson-dev
6464 cargo test --features magic,cuckoo --target=${{matrix.target}}
6565
66+ - name : Install uv for the python bindings tests
67+ uses : astral-sh/setup-uv@v5
68+ with :
69+ version : " 0.5.25"
70+
71+ - name : Set up Python
72+ uses : actions/setup-python@v5
73+ with :
74+ python-version-file : " boreal-py/pyproject.toml"
75+
76+ - name : Run python tests
77+ run : |
78+ cd boreal-py
79+ uv sync --dev
80+ uv run pytest
81+
6682 strategy :
6783 fail-fast : false
6884 matrix :
@@ -122,6 +138,22 @@ jobs:
122138 YARA_CRYPTO_LIB : openssl
123139 run : cargo test --features authenticode-verify --target=${{matrix.target}}
124140
141+ - name : Install uv for the python bindings tests
142+ uses : astral-sh/setup-uv@v5
143+ with :
144+ version : " 0.5.25"
145+
146+ - name : Set up Python
147+ uses : actions/setup-python@v5
148+ with :
149+ python-version-file : " boreal-py/pyproject.toml"
150+
151+ - name : Run python tests
152+ run : |
153+ cd boreal-py
154+ uv sync --dev
155+ uv run pytest
156+
125157 strategy :
126158 fail-fast : false
127159 matrix :
@@ -182,6 +214,22 @@ jobs:
182214 run : |
183215 sudo cargo test -- --test-threads=1 --ignored
184216
217+ - name : Install uv for the python bindings tests
218+ uses : astral-sh/setup-uv@v5
219+ with :
220+ version : " 0.5.25"
221+
222+ - name : Set up Python
223+ uses : actions/setup-python@v5
224+ with :
225+ python-version-file : " boreal-py/pyproject.toml"
226+
227+ - name : Run python tests
228+ run : |
229+ cd boreal-py
230+ uv sync --dev
231+ uv run pytest
232+
185233 strategy :
186234 fail-fast : false
187235 matrix :
@@ -238,17 +286,40 @@ jobs:
238286 - name : Install dependencies
239287 run : sudo apt install libjansson-dev
240288
289+ - name : Install uv for the python bindings tests
290+ uses : astral-sh/setup-uv@v5
291+ with :
292+ version : " 0.5.25"
293+
294+ - name : Set up Python
295+ uses : actions/setup-python@v5
296+ with :
297+ python-version-file : " boreal-py/pyproject.toml"
298+
299+ - name : Install the python dependencies
300+ run : |
301+ cd boreal-py
302+ uv sync --dev
303+
241304 - name : Generate code coverage
242305 run : |
243306 # Export cargo llvm-cov env stuff so that we can run "cargo test"
244307 # and have coverage
245308 source <(cargo llvm-cov show-env --export-prefix)
246309 cargo build -p boreal-test-helpers
310+
247311 # Run the normal tests
248312 cargo test --features magic,authenticode-verify,cuckoo
313+
249314 # And run the super user tests
250315 CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER="sudo -E" cargo \
251316 test --features magic,authenticode-verify,cuckoo -- --ignored
317+
318+ # And run the python bindings tests
319+ cd boreal-py
320+ uv run pytest
321+ cd ..
322+
252323 # Finally, generate the report
253324 cargo llvm-cov report --lcov --output-path lcov.info \
254325 --ignore-filename-regex boreal-test-helpers/src/main.rs
@@ -268,12 +339,23 @@ jobs:
268339 steps :
269340 - uses : actions/checkout@v4.1.1
270341 - uses : dtolnay/rust-toolchain@1.74.0
271- # Only check boreal ( and boreal-parser).
342+ # Only check boreal, boreal-parser and boreal-py
272343 # boreal-cli is a useful tool, but MSRV on it is not really useful.
273- - run : |
344+ - name : check boreal-parser
345+ run : |
346+ cd boreal-parser
347+ cargo check --all-features
348+
349+ - name : check boreal
350+ run : |
274351 cd boreal
275352 cargo check --all-features
276353
354+ - name : check boreal-py
355+ run : |
356+ cd boreal-py
357+ cargo check --all-features
358+
277359 features-matrix :
278360 name : Test features ${{matrix.features}}
279361 runs-on : ubuntu-22.04
0 commit comments