Skip to content
Closed
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
43 changes: 43 additions & 0 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CodSpeed

on:
push:
branches: [ master ]
pull_request:
branches: [ '*' ]
# Allow CodSpeed to trigger backtest performance analysis to generate
# the initial baseline data.
workflow_dispatch:

permissions:
contents: read
id-token: write # Required for OpenID Connect authentication with CodSpeed

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
benchmarks:
name: Run benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Needed for setuptools_scm

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Install package and benchmark dependencies
run: |
python -m pip install uv
uv pip install --system . pytest-codspeed

- name: Run benchmarks
uses: CodSpeedHQ/action@v4
with:
mode: simulation
run: pytest benchmarks/test_build.py benchmarks/test_lp_write.py benchmarks/test_matrices.py --quick --codspeed
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[![Tests](https://github.com/PyPSA/linopy/actions/workflows/test.yml/badge.svg)](https://github.com/PyPSA/linopy/actions/workflows/test.yml)
[![doc](https://readthedocs.org/projects/linopy/badge/?version=latest)](https://linopy.readthedocs.io/en/latest/)
[![codecov](https://codecov.io/gh/PyPSA/linopy/branch/master/graph/badge.svg?token=TT4EYFCCZX)](https://codecov.io/gh/PyPSA/linopy)
[![CodSpeed](https://img.shields.io/endpoint?url=https://codspeed.io/badge.json)](https://app.codspeed.io/PyPSA/linopy?utm_source=badge)



Expand Down
Loading