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

Use cov module instead of folder path #374

Merged
merged 1 commit into from
Oct 1, 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
10 changes: 5 additions & 5 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: pytest
run: |
# python3.9 -m pytest --capture=sys --capture=fd --cov=atomsci/ -vv atomsci/ddm/test/unit
cd atomsci/ddm/test/unit && python3.9 -m pytest -n 2 --capture=sys --capture=fd --cov=atomsci/ -vv
cd atomsci/ddm/test/unit && python3.9 -m pytest -n 2 --capture=sys --capture=fd --cov=atomsci -vv
env:
ENV: test

Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
- name: pytest
run: |
# TODO: Run this test with pytest for paralell testing
# python3.9 -m pytest -n 2 --capture=sys --capture=fd --cov=atomsci/ -vv atomsci/ddm/test/integrative
# python3.9 -m pytest -n 2 --capture=sys --capture=fd --cov=atomsci -vv atomsci/ddm/test/integrative
cd atomsci/ddm/test/integrative && ./integrative_batch_chunk_tests 0
env:
ENV: test
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
- name: pytest
run: |
# TODO: Run this test with pytest for paralell testing
# python3.9 -m pytest -n 2 --capture=sys --capture=fd --cov=atomsci/ -vv atomsci/ddm/test/integrative
# python3.9 -m pytest -n 2 --capture=sys --capture=fd --cov=atomsci -vv atomsci/ddm/test/integrative
cd atomsci/ddm/test/integrative && ./integrative_batch_chunk_tests 1
env:
ENV: test
Expand Down Expand Up @@ -177,7 +177,7 @@ jobs:
- name: pytest
run: |
# TODO: Run this test with pytest for paralell testing
# python3.9 -m pytest -n 2 --capture=sys --capture=fd --cov=atomsci/ -vv atomsci/ddm/test/integrative
# python3.9 -m pytest -n 2 --capture=sys --capture=fd --cov=atomsci -vv atomsci/ddm/test/integrative
cd atomsci/ddm/test/integrative && ./integrative_batch_chunk_tests 2
env:
ENV: test
Expand Down Expand Up @@ -223,7 +223,7 @@ jobs:
- name: pytest
run: |
# TODO: Run this test with pytest for paralell testing
# python3.9 -m pytest -n 2 --capture=sys --capture=fd --cov=atomsci/ -vv atomsci/ddm/test/integrative
# python3.9 -m pytest -n 2 --capture=sys --capture=fd --cov=atomsci -vv atomsci/ddm/test/integrative
cd atomsci/ddm/test/integrative && ./integrative_batch_chunk_tests 3
env:
ENV: test
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ pytest-integrative:

pytest-unit:
@echo "Running unit tests"
docker run -v $(shell pwd)/$(WORK_DIR):/$(WORK_DIR) $(IMAGE_REPO):$(PLATFORM)-$(ENV) \
/bin/bash -l -c "cd atomsci/ddm/test/unit && python3.9 -m pytest --capture=sys --capture=fd --cov=atomsci/ -vv"
docker run -v $(shell pwd)/$(WORK_DIR):/$(WORK_DIR) $(IMAGE_REPO):$(TAG) \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought I had changed most of $(PLATFORM)-$(ENV) --> $(TAG) 🤔

/bin/bash -l -c "cd atomsci/ddm/test/unit && python3.9 -m pytest --capture=sys --capture=fd --cov=atomsci -vv"

# Run ruff linter
ruff:
Expand Down
2 changes: 1 addition & 1 deletion atomsci/ddm/test/integrative/integrative_batch_chunk_tests
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ for folder in "${folders[@]}"; do
if [[ -f "$file" && "$folder" != "__pycache__/" ]]; then
cd "$folder"
echo "Testing $folder"
pytest --capture=sys --capture=fd --cov=atomsci/ -vv
pytest --capture=sys --capture=fd --cov=atomsci -vv
cd ..
else
echo "Skipping folder: $folder. Not a test directory."
Expand Down
Loading