Skip to content

Commit

Permalink
chore: add codspeed benchmarks (#340)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Jan 7, 2025
1 parent 1c20dcc commit 5bf90b9
Show file tree
Hide file tree
Showing 5 changed files with 247 additions and 5 deletions.
29 changes: 26 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,12 @@ jobs:
- "use_cython"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Update apt
run: sudo apt update
- name: Install libs
run: sudo apt-get install -y dbus-daemon python3-gi libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-3.0
- name: Install poetry
run: pipx install poetry
- uses: snok/install-poetry@v1.3.4
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand All @@ -75,6 +74,30 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}

benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update apt
run: sudo apt update
- name: Install libs
run: sudo apt-get install -y dbus-daemon python3-gi libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-3.0
- uses: snok/install-poetry@v1.3.4
- name: Setup Python 3.13
uses: actions/setup-python@v5
with:
python-version: 3.13
cache: "poetry"
- name: Install Dependencies
run: |
REQUIRE_CYTHON=1 poetry install --only=main,dev
shell: bash
- name: Run benchmarks
uses: CodSpeedHQ/action@v3
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: dbus-run-session -- poetry run pytest --no-cov -vvvvv --codspeed tests/benchmarks

release:
runs-on: ubuntu-latest
environment: release
Expand Down
154 changes: 153 additions & 1 deletion poetry.lock

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

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ PyGObject = "^3.42.2"
Cython = ">=3,<3.1.0"
setuptools = ">=65.4.1,<76.0.0"
pytest-timeout = "^2.1.0"
pytest-codspeed = "^3.1.1"

[tool.semantic_release]
branch = "main"
Expand Down
Loading

0 comments on commit 5bf90b9

Please sign in to comment.