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

Codspeed - performance benchmarks #471

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
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
13 changes: 13 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
pull_request:
branches:
- '**'
# `workflow_dispatch` allows CodSpeed to trigger backtest performance analysis in order to generate initial data.
workflow_dispatch:

jobs:
build:
Expand Down Expand Up @@ -51,6 +53,17 @@ jobs:
COV_CORE_SOURCE: .
COV_CORE_CONFIG: .coveragerc
COV_CORE_DATAFILE: .coverage.eager

- name: Test with CodSpeed
uses: CodSpeedHQ/action@v3
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: poetry run py.test --cov=./ --cov-append --cov-report=xml --codspeed
env:
COV_CORE_SOURCE: .
COV_CORE_CONFIG: .coveragerc
COV_CORE_DATAFILE: .coverage.eager

- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
5 changes: 5 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ $ pip install --user --upgrade --pre libvcs

### Breaking changes

#### pytest plugin: Improve performacne via session-based scoping (#472)

Improved test execution speed by over 54% by eliminated repetitive repository reinitialization between test runs.
Git, Subversion, and Mercurial repositories are now cached from an initial starter repository

#### pytest fixtures: `git_local_clone` renamed to `example_git_repo` (#468)

Renamed `git_local_clone` to `example_git_repo` for better understandability in
Expand Down
150 changes: 149 additions & 1 deletion poetry.lock

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

5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ linkify-it-py = "*"
### Testing ###
gp-libs = "*"
pytest = "*"
pytest-codspeed = "*"
pytest-rerunfailures = "*"
pytest-mock = "*"
pytest-watcher = "*"
Expand All @@ -112,6 +113,10 @@ files = [
"tests",
]

[[tool.mypy.overrides]]
module = "pytest_codspeed.plugin"
ignore_missing_imports = true

[tool.coverage.run]
branch = true
parallel = true
Expand Down
Loading