Skip to content

Add benchmark and codspeed integration #7

Add benchmark and codspeed integration

Add benchmark and codspeed integration #7

Workflow file for this run

name: codspeed-benchmarks
on:
# Run on pushes to the main branch
push:
branches:
- "main"
# Run on pull requests
pull_request:
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:
jobs:
benchmarks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
# codspeed needs 3.12 for trace generation
python-version: 3.12
- name: Set up environment
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Almighty"
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install git-annex
run: |
python -m pip install datalad-installer
datalad-installer -E ${HOME}/dlinstaller_env.sh --sudo ok git-annex -m snapshot
. ${HOME}/dlinstaller_env.sh
- name: Install dependencies
run: |
python -m pip install -r requirements-devel.txt
python -m pip install pytest-codspeed
- name: Debug
run: |
echo "$PATH"
. "${HOME}/dlinstaller_env.sh"
echo "$PATH"
git annex version
- name: Run benchmarks
uses: CodSpeedHQ/action@v2
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: |
python -m pytest --codspeed datalad_next