diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 98f25f7..3d14d59 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -216,6 +216,32 @@ jobs: - name: Run memory leak tests run: pytest tests/test_memory.py -v --tb=short + fuzz: + name: Fuzz Testing + runs-on: ubuntu-latest + needs: [lint] + container: + image: python:3.11-slim + + steps: + - name: Setup and checkout + run: | + apt-get update -qq && apt-get install -yqq --no-install-recommends git >/dev/null + git clone --depth 1 --branch "${GITHUB_REF_NAME}" \ + "https://oauth2:${{ github.token }}@${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}.git" . + + - name: Install dependencies + run: | + pip install -q -r requirements.txt + pip install -q pytest hypothesis + + - name: Run hypothesis fuzz tests + run: | + # Run with reduced examples for CI (full suite is slow) + pytest tests/test_fuzz.py -v --tb=short \ + --hypothesis-seed=0 \ + -x + sbom: name: SBOM Generation runs-on: ubuntu-latest