Skip to content

Add valgrind in CI #355

Add valgrind in CI

Add valgrind in CI #355

Workflow file for this run

name: Run Tests
on:
push:
branches:
- 'main'
pull_request:
jobs:
run-tests:
name: "Test (${{matrix.os}}, Python ${{ matrix.python-version }}, ${{ matrix.architecture }})"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, macos-13, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
architecture: [x64, x86, arm64]
exclude:
- os: ubuntu-latest
architecture: x86
- os: ubuntu-latest
architecture: arm64
- os: ubuntu-24.04-arm
architecture: x86
- os: ubuntu-24.04-arm
architecture: x64
- os: macos-latest
architecture: x86
- os: macos-latest
architecture: x64
- os: macos-13
architecture: x86
- os: macos-13
architecture: arm64
- os: windows-latest
architecture: arm64
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
- name: Install Python requirements
run: pip install --upgrade --upgrade-strategy eager .
- name: Install pytest
run: |
pip install pytest
- name: Run tests
if: runner.os != 'Linux'
run: |
pytest
- name: Install Valgrind
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y valgrind
- name: Run tests with Valgrind
if: runner.os == 'Linux'
run: |
PYTHONMALLOC=debug valgrind --leak-check=full --errors-for-leak-kinds=definite --error-exitcode=1 --show-reachable=no pytest