Skip to content

Pytest

Pytest #800

Workflow file for this run

name: Pytest
defaults:
run:
# To load bashrc
shell: bash -ieo pipefail {0}
on:
push:
branches:
- main
- dev
pull_request:
schedule:
# run CI every day even if no PRs/merges occur
- cron: '0 12 * * *'
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python: ${{fromJSON('["3.9", "3.10", "3.11", "3.12"]') }}
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
# Used by ci_test.sh
- name: Install dependencies in ${{ matrix.python }}
run: |
pip install .
pip install pytest
pip install pytest-cov
- name: Run Parsing tests in ${{ matrix.python }}
run: |
pytest tests/test_parsing.py tests/test_versions.py --cov=tealer/teal/instructions --cov-branch --cov-fail-under=96
- name: Run string tests in ${{ matrix.python }}
run: |
pytest tests/test_string_representation.py
- name: Run version tests in ${{ matrix.python }}
run: |
pytest tests/test_versions.py
pytest tests/test_mode_detector.py
- name: Run cfg recovery tests in ${{ matrix.python }}
run: |
pytest tests/test_cfg.py
- name: Run detectors tests in ${{ matrix.python }}
run: |
pytest tests/test_detectors.py
- name: Run dataflow analysis tests
run: |
pytest tests/transaction_context/test_group_sizes.py
pytest tests/transaction_context/test_group_indices.py
pytest tests/transaction_context/test_transaction_types.py
pytest tests/transaction_context/test_addr_fields.py
- name: Run regex tests
run: |
pytest tests/test_regex.py