mirror of
https://github.com/microsoft/autogen.git
synced 2026-04-20 03:02:16 -04:00
Use caching to run tests and report coverage (#5086)
* use caching to run tests and report coverage * fix test step dep name * try to fix cov fname * add working dir to mv step * update artifact download * fmt * reduce concurrency on ext test --------- Co-authored-by: Leonardo Pinheiro <lpinheiro@microsoft.com>
This commit is contained in:
committed by
GitHub
parent
ce20de9afb
commit
a1fdbd9692
@@ -35,5 +35,4 @@ testpaths = ["tests"]
|
||||
include = "../../shared_tasks.toml"
|
||||
|
||||
[tool.poe.tasks]
|
||||
test = "pytest -n auto"
|
||||
coverage = "pytest -n auto --cov=src --cov-report=term-missing --cov-report=xml"
|
||||
test = "pytest -n auto --cov=src --cov-report=term-missing --cov-report=xml"
|
||||
|
||||
@@ -106,8 +106,7 @@ mypy = [
|
||||
include = "../../shared_tasks.toml"
|
||||
|
||||
[tool.poe.tasks]
|
||||
test = "pytest -n auto"
|
||||
coverage = "pytest -n auto --cov=src --cov-report=term-missing --cov-report=xml"
|
||||
test = "pytest -n auto --cov=src --cov-report=term-missing --cov-report=xml"
|
||||
mypy.default_item_type = "cmd"
|
||||
mypy.sequence = [
|
||||
"mypy --config-file ../../pyproject.toml --exclude src/autogen_core/application/protos --exclude tests/protos src tests",
|
||||
|
||||
@@ -87,14 +87,9 @@ include = "../../shared_tasks.toml"
|
||||
[tool.poe.tasks]
|
||||
test.sequence = [
|
||||
"playwright install",
|
||||
"pytest -n auto",
|
||||
"pytest -n 1 --cov=src --cov-report=term-missing --cov-report=xml",
|
||||
]
|
||||
test.default_item_type = "cmd"
|
||||
coverage.sequence = [
|
||||
"playwright install",
|
||||
"pytest -n auto --cov=src --cov-report=term-missing --cov-report=xml",
|
||||
]
|
||||
coverage.default_item_type = "cmd"
|
||||
mypy = "mypy --config-file ../../pyproject.toml --exclude src/autogen_ext/runtimes/grpc/protos --exclude tests/protos src tests"
|
||||
|
||||
[tool.mypy]
|
||||
|
||||
@@ -54,15 +54,10 @@ include = "../../shared_tasks.toml"
|
||||
|
||||
[tool.poe.tasks]
|
||||
test.sequence = [
|
||||
"playwright install",
|
||||
"pytest -n auto",
|
||||
]
|
||||
test.default_item_type = "cmd"
|
||||
coverage.sequence = [
|
||||
"playwright install",
|
||||
"pytest -n auto --cov=src --cov-report=term-missing --cov-report=xml",
|
||||
]
|
||||
coverage.default_item_type = "cmd"
|
||||
test.default_item_type = "cmd"
|
||||
|
||||
[tool.ruff]
|
||||
extend = "../../pyproject.toml"
|
||||
|
||||
@@ -88,5 +88,4 @@ ignore = ["B008"]
|
||||
fmt = "ruff format"
|
||||
format.ref = "fmt"
|
||||
lint = "ruff check"
|
||||
test = "pytest -n 0"
|
||||
coverage = "pytest -n 0 --cov=autogenstudio --cov-report=term-missing"
|
||||
test = "pytest -n 0 --cov=autogenstudio --cov-report=term-missing"
|
||||
|
||||
@@ -27,4 +27,3 @@ include = "../../shared_tasks.toml"
|
||||
[tool.poe.tasks]
|
||||
mypy = "mypy --config-file $POE_ROOT/../../pyproject.toml src"
|
||||
test = "true"
|
||||
coverage = "true"
|
||||
|
||||
@@ -39,4 +39,3 @@ include = "../../shared_tasks.toml"
|
||||
[tool.poe.tasks]
|
||||
mypy = "mypy --config-file $POE_ROOT/../../pyproject.toml src"
|
||||
test = "true"
|
||||
coverage = "true"
|
||||
|
||||
@@ -44,4 +44,3 @@ include = "../../shared_tasks.toml"
|
||||
[tool.poe.tasks]
|
||||
mypy = "mypy --config-file $POE_ROOT/../../pyproject.toml src"
|
||||
test = "true"
|
||||
coverage = "true"
|
||||
|
||||
@@ -90,11 +90,10 @@ lint = "python run_task_in_pkgs_if_exist.py lint"
|
||||
pyright = "python run_task_in_pkgs_if_exist.py pyright"
|
||||
mypy = "python run_task_in_pkgs_if_exist.py mypy"
|
||||
test = "python run_task_in_pkgs_if_exist.py test"
|
||||
coverage = "python run_task_in_pkgs_if_exist.py coverage"
|
||||
markdown-code-lint = """python check_md_code_blocks.py ../README.md ./packages/autogen-core/docs/src/**/*.md"""
|
||||
samples-code-check = """pyright ./samples"""
|
||||
|
||||
check = ["fmt", "lint", "pyright", "mypy", "coverage", "markdown-code-lint", "samples-code-check"]
|
||||
check = ["fmt", "lint", "pyright", "mypy", "test", "markdown-code-lint", "samples-code-check"]
|
||||
|
||||
gen-proto = "python -m grpc_tools.protoc --python_out=./packages/autogen-ext/src/autogen_ext/runtimes/grpc/protos --grpc_python_out=./packages/autogen-ext/src/autogen_ext/runtimes/grpc/protos --mypy_out=./packages/autogen-ext/src/autogen_ext/runtimes/grpc/protos --mypy_grpc_out=./packages/autogen-ext/src/autogen_ext/runtimes/grpc/protos --proto_path ../protos/ agent_worker.proto --proto_path ../protos/ cloudevent.proto"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user