Skip to content

Commit

Permalink
✅ Report coverage in XML (#146)
Browse files Browse the repository at this point in the history
* ✅ Report XML Coverate to support GitHub Actions

* 🙈 Add coverage report to .gitignore

* ✅ Add custom testing .zshrc logic for coverage
  • Loading branch information
tiangolo authored Jul 19, 2020
1 parent cef7fee commit 6da7364
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ site
.coverage
htmlcov
.pytest_cache
coverage.xml
2 changes: 1 addition & 1 deletion scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ set -x
bash ./scripts/test-files.sh
bash ./scripts/lint.sh
# Use xdist-pytest --forked to ensure modified sys.path to import relative modules in examples keeps working
pytest --cov=typer --cov=tests --cov=docs_src --cov-report=term-missing -o console_output_style=progress --forked --numprocesses=auto ${@}
pytest --cov=typer --cov=tests --cov=docs_src --cov-report=term-missing --cov-report=xml -o console_output_style=progress --forked --numprocesses=auto ${@}
2 changes: 2 additions & 0 deletions tests/test_completion/test_completion_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ def test_completion_install_bash():
def test_completion_install_zsh():
completion_path: Path = Path.home() / ".zshrc"
text = ""
if not completion_path.is_file(): # pragma: nocover
completion_path.write_text('echo "custom .zshrc"')
if completion_path.is_file():
text = completion_path.read_text()
result = subprocess.run(
Expand Down

1 comment on commit 6da7364

@github-actions
Copy link

Choose a reason for hiding this comment

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

Please sign in to comment.