Skip to content

dev -> main for 4.1.0 #85

dev -> main for 4.1.0

dev -> main for 4.1.0 #85

Workflow file for this run

name: CodSpeed benchmarks
on:
push:
branches:
- main
- dev
paths:
- codspeed.yml
- nf_core/**/*.py
pull_request:
paths:
- codspeed.yml
- nf_core/**/*.py
workflow_dispatch:
# Cancel if a newer run with the same workflow name is queued
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
id-token: write # for OpenID Connect authentication with CodSpeed
jobs:
startup-benchmarks:
name: Run start-up benchmarks
runs-on: codspeed-macro
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
name: Check out source-code repository
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
with:
python-version: "3.14"
- name: Install Nextflow
uses: nf-core/setup-nextflow@893c28b667aedeba26e37f296d260ccc5bc4d914 # v3
with:
version: ${{ github.event.inputs.nextflow-version || matrix.nextflow-version }}
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
enable-cache: true
- name: Install dependencies
run: uv sync --all-extras
# Clone nf-core/modules into the local cache here, while network is
# available. The modules-install benchmark then runs entirely offline
# (no per-round fetch), so it stays deterministic even if the CodSpeed
# step sandboxes network during measurement.
- name: Warm nf-core/modules cache
run: uv run python -c "from nf_core.modules.modules_repo import ModulesRepo; ModulesRepo()"
# These benchmarks spawn a fresh interpreter per round to measure
# import/start-up cost, which CodSpeed's instruction-counting
# "simulation" instrument can't see. Use "walltime" mode instead.
- name: Run start-up benchmarks
uses: CodSpeedHQ/action@88472375d0a4572cf70a9f1fe3a4e0ab8da1b924 # v5.0.1
with:
mode: walltime
run: uv run pytest benchmarks/test_startup_benchmarks.py --codspeed