|
1 | 1 | name: Test Volatility3 |
2 | 2 | on: [push, pull_request] |
3 | 3 | jobs: |
4 | | - |
5 | 4 | build: |
6 | 5 | runs-on: ubuntu-22.04 |
7 | 6 | strategy: |
8 | 7 | matrix: |
9 | 8 | python-version: ["3.8"] |
10 | 9 | steps: |
11 | | - - uses: actions/checkout@v4 |
12 | | - - name: Set up Python ${{ matrix.python-version }} |
13 | | - uses: actions/setup-python@v5 |
14 | | - with: |
15 | | - python-version: ${{ matrix.python-version }} |
16 | | - |
17 | | - - name: Install dependencies |
18 | | - run: | |
19 | | - python -m pip install --upgrade pip Cmake build |
20 | | - pip install .[test] |
21 | | -
|
22 | | - - name: Build PyPi packages |
23 | | - run: | |
24 | | - python -m build |
25 | | -
|
26 | | - - name: Download images |
27 | | - run: | |
28 | | - mkdir test_images |
29 | | - cd test_images |
30 | | - curl -sLO "https://downloads.volatilityfoundation.org/volatility3/images/linux-sample-1.bin.gz" |
31 | | - gunzip linux-sample-1.bin.gz |
32 | | - curl -sLO "https://downloads.volatilityfoundation.org/volatility3/images/win-xp-laptop-2005-06-25.img.gz" |
33 | | - gunzip win-xp-laptop-2005-06-25.img.gz |
34 | | - curl -sLO "https://downloads.volatilityfoundation.org/volatility3/images/win-10_19041-2025_03.dmp.gz" |
35 | | - gunzip win-10_19041-2025_03.dmp.gz |
36 | | - cd - |
37 | | -
|
38 | | - - name: Download and Extract symbols |
39 | | - run: | |
40 | | - cd ./volatility3/symbols |
41 | | - curl -sLO https://downloads.volatilityfoundation.org/volatility3/symbols/linux.zip |
42 | | - curl -sLO https://downloads.volatilityfoundation.org/volatility3/symbols/symbols_win-10_19041-2025_03.zip |
43 | | - unzip linux.zip |
44 | | - unzip symbols_win-10_19041-2025_03.zip |
45 | | - cd - |
46 | | -
|
47 | | - - name: Testing... |
48 | | - run: | |
49 | | - # VolShell |
50 | | - pytest ./test/plugins/windows/windows.py --volatility=volshell.py --image-dir=./test_images -k test_windows_volshell -v |
51 | | - pytest ./test/plugins/linux/linux.py --volatility=volshell.py --image-dir=./test_images -k test_linux_volshell -v |
52 | | -
|
53 | | - # Volatility |
54 | | - pytest ./test/plugins/windows/windows.py --volatility=vol.py --image=./test_images/win-10_19041-2025_03.dmp -k "test_windows and not test_windows_volshell" -v --durations=0 |
55 | | - pytest ./test/plugins/linux/linux.py --volatility=vol.py --image-dir=./test_images -k "test_linux and not test_linux_volshell" -v --durations=0 |
56 | | -
|
57 | | - - name: Clean up post-test |
58 | | - run: | |
59 | | - rm -rf test_images |
60 | | - cd volatility3/symbols |
61 | | - rm -rf linux |
62 | | - rm -rf linux.zip |
63 | | - cd - |
| 10 | + - uses: actions/checkout@v4 |
| 11 | + - name: Set up Python ${{ matrix.python-version }} |
| 12 | + uses: actions/setup-python@v5 |
| 13 | + with: |
| 14 | + python-version: ${{ matrix.python-version }} |
| 15 | + |
| 16 | + - name: Install dependencies |
| 17 | + run: | |
| 18 | + python -m pip install --upgrade pip Cmake build |
| 19 | + pip install .[test] |
| 20 | +
|
| 21 | + - name: Build PyPi packages |
| 22 | + run: | |
| 23 | + python -m build |
| 24 | +
|
| 25 | + - name: Download images |
| 26 | + run: | |
| 27 | + mkdir test_images |
| 28 | + cd test_images |
| 29 | + curl -sLO "https://downloads.volatilityfoundation.org/volatility3/images/linux-sample-1.bin.gz" |
| 30 | + gunzip linux-sample-1.bin.gz |
| 31 | + curl -sLO "https://downloads.volatilityfoundation.org/volatility3/images/win-xp-laptop-2005-06-25.img.gz" |
| 32 | + gunzip win-xp-laptop-2005-06-25.img.gz |
| 33 | + curl -sLO "https://downloads.volatilityfoundation.org/volatility3/images/win-10_19041-2025_03.dmp.gz" |
| 34 | + gunzip win-10_19041-2025_03.dmp.gz |
| 35 | + cd - |
| 36 | +
|
| 37 | + - name: Download and Extract symbols |
| 38 | + run: | |
| 39 | + cd ./volatility3/symbols |
| 40 | + curl -sLO https://downloads.volatilityfoundation.org/volatility3/symbols/linux.zip |
| 41 | + curl -sLO https://downloads.volatilityfoundation.org/volatility3/symbols/symbols_win-10_19041-2025_03.zip |
| 42 | + unzip linux.zip |
| 43 | + unzip symbols_win-10_19041-2025_03.zip |
| 44 | + cd - |
| 45 | +
|
| 46 | + - name: Testing... |
| 47 | + run: | |
| 48 | + # VolShell |
| 49 | + pytest --cov-append --cov-report=html --cov= ./test/plugins/windows/windows.py --volatility=volshell.py --image-dir=./test_images -k test_windows_volshell -v |
| 50 | + pytest --cov-append --cov-report=html --cov= ./test/plugins/linux/linux.py --volatility=volshell.py --image-dir=./test_images -k test_linux_volshell -v |
| 51 | +
|
| 52 | + # Volatility |
| 53 | + pytest --cov-append --cov-report=html --cov= ./test/plugins/windows/windows.py --volatility=vol.py --image=./test_images/win-10_19041-2025_03.dmp -k "test_windows and not test_windows_volshell" -v --durations=0 |
| 54 | + pytest --cov-append --cov-report=html --cov= ./test/plugins/linux/linux.py --volatility=vol.py --image-dir=./test_images -k "test_linux and not test_linux_volshell" -v --durations=0 |
| 55 | +
|
| 56 | + - name: Create coverage artifacts |
| 57 | + uses: actions/upload-artifact@v4 |
| 58 | + with: |
| 59 | + name: code-coverage-report |
| 60 | + path: htmlcov |
| 61 | + overwrite: true |
| 62 | + retention-days: 7 |
| 63 | + |
| 64 | + - name: Clean up post-test |
| 65 | + run: | |
| 66 | + rm -rf test_images |
| 67 | + cd volatility3/symbols |
| 68 | + rm -rf linux |
| 69 | + rm -rf linux.zip |
| 70 | + cd - |
0 commit comments