Testing: Verify VersionRequirements

This adds a script and GitHub action to the `test` directory that
dynamically imports all modules in `volatility3`, searches for usages of
`VersionableInterface` objects within classes that inherit from
`ConfigurableInterface` but don't enumerate the used component as a
requirement in `get_requirements()`, and returns -1 if any violations
are found.

Fixes
This commit is contained in:
David McDonald
2025-03-28 13:21:10 -05:00
parent 49d0404031
commit 2ad1536b4e
3 changed files with 327 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
name: Check Volatility3 Version Requirements
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.8"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[test]
- name: Testing...
run: |
# Verify completeness of ConfigurableInterface requirements
python ./test/check_configurable_requirements.py