Skip to content

chore: add ci profiling (#108) #16

chore: add ci profiling (#108)

chore: add ci profiling (#108) #16

name: codspeed-benchmarks
on:
push:
branches:
- "main" # or "master"
pull_request:
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:
# Use concurrency to ensure that only one instance of this workflow is running at a time
concurrency:
group: ci-profiling-codspeed-${{ github.sha }}
cancel-in-progress: true
jobs:
benchmarks:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v4
- uses: mamba-org/setup-micromamba@v1 # https://github.com/mamba-org/setup-micromamba
with:
cache-environment: false
environment-name: testing
condarc: |
channels:
- conda-forge
create-args: >-
ada-py
python=3.12
pytest
pytest-codspeed
- name: Run benchmarks
uses: CodSpeedHQ/action@v3
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: bash -el -c "pytest ./tests --ignore=./tests/fem/ --ignore=./tests/full/ --codspeed"