Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add more files in coverage #54

Merged
merged 5 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
[run]
omit = depyf/explain/*
source = depyf

[report]
include = depyf/*
19 changes: 12 additions & 7 deletions .github/workflows/test_pytorch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
python -m pip install flake8 pytest pytest-cov
python -m pip install setuptools
python -m pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
python setup.py develop
Expand All @@ -42,13 +42,18 @@ jobs:
echo "success"
- name: Test with pytest
run: |
python tests/test_pytorch/test_mp.py
python tests/test_pytorch/test_no_graph.py
python tests/test_pytorch/test_irregular.py
python tests/test_pytorch/test_simple_graph.py
python tests/test_pytorch/test_cellvars.py
coverage run --append tests/test_pytorch/test_mp.py
coverage run --append tests/test_pytorch/test_no_graph.py
coverage run --append tests/test_pytorch/test_irregular.py
coverage run --append tests/test_pytorch/test_simple_graph.py
coverage run --append tests/test_pytorch/test_cellvars.py
python tests/test_pytorch/spawn_tests.py
python tests/test_pytorch/cmp_output.py
python tests/test_pytorch/test_debug.py 2>&1 < tests/test_pytorch/debug_input.txt > tests/test_pytorch/debug_output.txt
cat tests/test_pytorch/debug_output.txt
python tests/test_pytorch/check_debug_output.py
python tests/test_pytorch/check_debug_output.py

- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion tests/test_pytorch/spawn_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os

def task():
subprocess.run("python tests/test_pytorch/test_pytorch.py", shell=True, input="c\n", text=True)
subprocess.run("coverage run --append tests/test_pytorch/test_pytorch.py", shell=True, input="c\n", text=True)

if __name__ == '__main__':

Expand Down
Loading