Files
trailofbits-buttercup/.github/workflows/tests.yml
T
2025-02-05 10:23:56 +01:00

51 lines
1.3 KiB
YAML

name: Unit tests
on:
push:
branches:
- main
pull_request:
jobs:
test:
strategy:
matrix:
component: [common, orchestrator, fuzzer, program-model, seed-gen, patcher]
python:
- "3.12"
runs-on: ubuntu-latest
services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Download Wasm runtime
run: wget https://github.com/vmware-labs/webassembly-language-runtimes/releases/download/python%2F3.12.0%2B20231211-040d5a6/python-3.12.0.wasm
if: ${{ matrix.component }} == 'seed-gen'
working-directory: seed-gen
- name: Setup ${{ matrix.component }} component
run: uv sync --all-extras
working-directory: ${{ matrix.component }}
- name: Run tests on ${{ matrix.component }} component
run: uv run pytest -svv ${{ matrix.pytest_args }}
env:
PYTHON_WASM_BUILD_PATH: "python-3.12.0.wasm"
working-directory: ${{ matrix.component }}