mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-08-21 14:02:22 +02:00
For example, when using VSCode with pytest, test autodiscovery triggers pytest_generate_tests(), adding all images to each test case. This causes issues, as Linux tests end up being executed with Windows and Mac images, and vice versa.
55 lines
1.5 KiB
YAML
55 lines
1.5 KiB
YAML
name: Test Volatility3
|
|
on: [push, pull_request]
|
|
jobs:
|
|
|
|
build:
|
|
runs-on: ubuntu-20.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 Cmake build
|
|
pip install .[test]
|
|
|
|
- name: Build PyPi packages
|
|
run: |
|
|
python -m build
|
|
|
|
- name: Download images
|
|
run: |
|
|
mkdir test_images
|
|
cd test_images
|
|
curl -sLO "https://downloads.volatilityfoundation.org/volatility3/images/linux-sample-1.bin.gz"
|
|
gunzip linux-sample-1.bin.gz
|
|
curl -sLO "https://downloads.volatilityfoundation.org/volatility3/images/win-xp-laptop-2005-06-25.img.gz"
|
|
gunzip win-xp-laptop-2005-06-25.img.gz
|
|
cd -
|
|
|
|
- name: Download and Extract symbols
|
|
run: |
|
|
cd ./volatility3/symbols
|
|
curl -sLO https://downloads.volatilityfoundation.org/volatility3/symbols/linux.zip
|
|
unzip linux.zip
|
|
cd -
|
|
|
|
- name: Testing...
|
|
run: |
|
|
pytest ./test/test_volatility.py --volatility=vol.py --image-dir=./test_images -k test_windows -v
|
|
pytest ./test/test_volatility.py --volatility=vol.py --image-dir=./test_images -k test_linux -v
|
|
|
|
- name: Clean up post-test
|
|
run: |
|
|
rm -rf test_images
|
|
cd volatility3/symbols
|
|
rm -rf linux
|
|
rm -rf linux.zip
|
|
cd -
|