Skip to content

Commit

Permalink
fix actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mastoffel committed Oct 30, 2024
1 parent 7f0fdc2 commit 7b3fadd
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 59 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

# Clean python cache files
- name: Clean cache files
run: |
find . -type f -name "*.pyc" -delete
find . -type d -name "__pycache__" -delete
rm -f .coverage* coverage.xml
# Cache Poetry dependencies
# - name: Cache dependencies
# uses: actions/cache@v2
Expand Down Expand Up @@ -56,10 +62,15 @@ jobs:
run: |
poetry run python -c "import torch; print(torch.__version__); print('CUDA available:', torch.cuda.is_available())"
- name: Debug Coverage Config
run: |
cat pyproject.toml
poetry run coverage debug config
- name: Run Tests with Coverage
run: |
poetry run coverage run -m pytest
poetry run coverage xml -o coverage.xml
poetry run coverage run --source=. -m pytest
poetry run coverage xml -i -o coverage.xml
env:
COVERAGE_FILE: ".coverage.${{ matrix.python-version }}"

Expand Down
120 changes: 65 additions & 55 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ black = "^23.10.1"
pre-commit = "^3.5.0"
jupyter-book = "^1.0.0"
pytest-cov = "^4.1.0"
coverage = "^7.3.1"
coverage = "^7.6.4"
plotnine = "^0.13.6"


Expand All @@ -56,4 +56,8 @@ requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.coverage.run]
relative_files = true
relative_files = true
source = [
".",
"/tmp"
]

0 comments on commit 7b3fadd

Please sign in to comment.