forked from isagalaev/ijson
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GHA job to run memory leak tests
We don't run them on Windows because we know the memory measurement code currently runs only on Unix. We can tackle that separately though. Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Run memory leak tests | ||
|
||
# Build on every branch push, tag push, and pull request change: | ||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
# 00:00 UTC every Saturday, don't bother anyone | ||
- cron: '0 0 * * 6' | ||
|
||
jobs: | ||
|
||
memleak_tests: | ||
name: Build ijson and run unit tests (${{ matrix.os }}, ${{ matrix.python_version }}) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
python_version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13-dev"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- uses: actions/setup-python@v5 | ||
name: Install Python | ||
with: | ||
python-version: ${{ matrix.python_version }} | ||
|
||
- name: Install build test dependencies | ||
run: pip install setuptools | ||
|
||
- name: Install Yajl | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
run: sudo apt install libyajl-dev | ||
|
||
- name: Build ijson | ||
env: | ||
IJSON_EMBED_YAJL: ${{ matrix.os != 'ubuntu-latest' && '1' || '0' }} | ||
run: python setup.py develop | ||
|
||
- name: Install test dependencies | ||
run: pip install -r test-requirements.txt | ||
|
||
- name: Run memory leak tests | ||
run: pytest --memleak-only -v |