Skip to content

refactor variable handling module for narwahls #13

refactor variable handling module for narwahls

refactor variable handling module for narwahls #13

Workflow file for this run

name: CodSpeed
on:
push:
branches:
- main
# Only fire on the events the job's `if:` below actually needs: `labeled`
# (adding the `runcodespeed` label) and `synchronize` (further pushes,
# which re-benchmark for as long as the label stays attached). Doc-only
# changes are skipped entirely, since they can't affect performance.
pull_request:
types: [labeled, synchronize]
paths-ignore:
- '**.md'
- '**.rst'
- 'docs/**'
- 'paper/**'
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# Cancel a stale in-progress run when a PR gets pushed to again, but let
# every push to main finish, since each one records a CodSpeed baseline.
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
id-token: write # for OpenID Connect authentication with CodSpeed
jobs:
benchmarks:
name: Run benchmarks
runs-on: ubuntu-latest
# Always run for push (main) and workflow_dispatch. For pull_request
# events, only run while the PR carries the `runcodespeed` label.
if: >
github.event_name != 'pull_request' ||
contains(github.event.pull_request.labels.*.name, 'runcodespeed')
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install pytest pytest-codspeed
- name: Run benchmarks
uses: CodSpeedHQ/action@v5
with:
mode: simulation
run: pytest benchmarks/ --codspeed