Skip to content
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
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Please include a summary of the change, the problem it solves, the implementation approach, and relevant context. List any dependencies required for this change.

Related Issue (Required): Fixes @issue_number
Related Issue (Required): Fixes #issue_number

## Type of change

Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ jobs:
if: ${{ !startsWith(matrix.os, 'macos-13') }}
run: |
poetry install --no-interaction --extras all
- name: PyTest unit tests
- name: PyTest unit tests with coverage
if: ${{ !startsWith(matrix.os, 'macos-13') }}
shell: bash
run: |
poetry run pytest tests -vv --durations=10
poetry run pytest tests -vv --durations=10 \
--cov=src/memos \
--cov-report=term-missing \
--cov-fail-under=28
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
report/
cov-report/
.tox/
.nox/
.coverage
Expand Down
17 changes: 16 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: test
.PHONY: test test-report test-cov

install:
poetry install --extras all --with dev --with test
Expand All @@ -9,10 +9,25 @@ clean:
rm -rf .pytest_cache
rm -rf .ruff_cache
rm -rf tmp
rm -rf report cov-report
rm -f .coverage .coverage.*

test:
poetry run pytest tests

test-report:
poetry run pytest tests -vv --durations=10 \
--html=report/index.html \
--cov=src/memos \
--cov-report=term-missing \
--cov-report=html:cov-report/src

test-cov:
poetry run pytest tests \
--cov=src/memos \
--cov-report=term-missing \
--cov-report=html:cov-report/src

format:
poetry run ruff check --fix
poetry run ruff format
Expand Down
Loading
Loading