-
-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (42 loc) · 1.44 KB
/
memory_leak.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Memory Leaks
on:
push:
branches:
- master
paths:
- 'src/**'
- '.github/workflows/memory_leak.yml'
pull_request:
branches:
- master
paths:
- 'src/**'
- '.github/workflows/memory_leak.yml'
env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"
PYTHONIOENCODING: "utf8"
jobs:
memory-leaks:
name: Check for memory leaks and errors
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.12
uses: actions/setup-python@v2
with:
python-version: 3.12
- name: Install Pytest
run: |
pip install pytest pytest-asyncio pytest-memray typing_extensions
shell: bash
- name: Build PyAwaitable
run: pip install .
- name: Build PyAwaitable Test Package
run: pip install setuptools wheel && pip install tests/extension/ --no-build-isolation
- name: Install Valgrind
run: sudo apt-get update && sudo apt-get -y install valgrind
- name: Run tests with Memray tracking
run: pytest --enable-leak-tracking -W error --stacks=50 --native
- name: Run tests with Valgrind
run: valgrind --suppressions=valgrind-python.supp --error-exitcode=1 pytest -x