GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - CodSpeedHQ/action: Github Actions for running CodSpeed in your CI

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
BranchesTags
Open more actions menu

Latest commit

 

History

316 Commits
316 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.vscode
.vscode
 
 
examples
examples
 
 
scripts
scripts
 
 
.codspeed-runner-installer-hashes.json
.codspeed-runner-installer-hashes.json
 
 
.codspeed-runner-version
.codspeed-runner-version
 
 
.gitignore
.gitignore
 
 
.prettierrc.json
.prettierrc.json
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
action.yml
action.yml
 
 

Repository files navigation

CodSpeed Action

CI GitHub release (latest by date) Discord

GitHub Actions for running CodSpeed in your CI.

Usage

- uses: CodSpeedHQ/action@v5
  with:
    # [OPTIONAL]
    # The command used to run your CodSpeed benchmarks
    #
    # Leave empty to use targets defined in your project configuration (e.g `codspeed.yml`)
    # https://codspeed.io/docs/cli#configuration
    # ⚠️ WARNING: for action/runner versions lower than v4.9.0, this parameter is required.
    run: "<YOUR_COMMAND>"

    # [REQUIRED]
    # The measurement mode(s) to use. Possible values: "simulation" (recommended), "walltime".
    # Accepts a single value or a comma-separated list (e.g., "simulation,walltime").
    # More details on the instruments at https://docs.codspeed.io/instruments/
    mode: "simulation"

    # [OPTIONAL]
    # CodSpeed recommends using OpenID Connect (OIDC) for authentication.
    #
    # If you are not using OpenID Connect, set the CodSpeed upload token
    # that can be found at https://codspeed.io/<org>/<repo>/settings
    # It's strongly recommended to use a secret for this value
    # If you're instrumenting a public repository, you can omit this value altogether
    #
    # More information in the CodSpeed documentation:
    # https://codspeed.io/docs/integrations/ci/github-actions#authentication
    token: ""

    # [OPTIONAL]
    # The directory where the `run` command will be executed.
    # ⚠️ WARNING: if you use `defaults.run.working-directory`, you must still set this parameter.
    working-directory: ""

    # [OPTIONAL]
    # Path to a CodSpeed configuration file (codspeed.yml).
    # If not specified, the runner will look for a codspeed.yml file in the repository root.
    config: ""

    # [OPTIONAL]
    # Comma-separated list of instruments to enable. Possible values: mongodb.
    instruments: ""

    # [OPTIONAL]
    # The name of the environment variable that contains the MongoDB URI to patch.
    # If not provided, user will have to provide it dynamically through a CodSpeed integration.
    # Only used if the `mongodb` instrument is enabled.
    mongo_uri_env_name: ""

    # [OPTIONAL]
    # Enable caching of instrument installations (like valgrind or perf) to speed up
    # subsequent workflow runs. Set to 'false' to disable caching. Defaults to 'true'.
    cache-instruments: "true"

    # [OPTIONAL]
    # The directory to use for caching installations of instruments (like valgrind or perf).
    # This will speed up subsequent workflow runs by reusing previously installed instruments.
    # Defaults to $HOME/.cache/codspeed-action if not specified.
    instruments-cache-dir: ""

    # [OPTIONAL]
    # A custom upload url, only if you are using an on premise CodSpeed instance
    upload-url: ""

    # [OPTIONAL]
    # The version of the go-runner to use (e.g., 1.0.0, 1.0.0-beta.1). If not specified, the latest version will be installed
    go-runner-version: ""

    # [OPTIONAL]
    # Improve `simulation` accuracy by weighting each instruction by its estimated cycle
    # cost instead of charging every instruction the same fixed cost.
    # Set to "false" to disable. Requires runner v5 or later.
    # Defaults to "true".
    cycle-estimation: ""

    # [OPTIONAL]
    # Exclude memory allocation time from `simulation` mode results. Set to "true" to
    # enable. Requires runner v5 or later.
    # Defaults to "false".
    exclude-allocations: ""

    # [OPTIONAL]
    # Measure the subprocesses spawned by the benchmarked process in `simulation` mode.
    # Set to "true" to enable. Requires runner v5.2.0 or later.
    # Defaults to "false".
    simulation-track-subprocess: ""

    # [OPTIONAL]
    # Disable physical (resident) memory tracking in `memory` mode.
    # Set to "true" to disable. Enabled by default on supported runners.
    # Requires runner v5.4.0 or later.
    disable-memory-track-physical: ""

    # [OPTIONAL]
    # Disable allocation call stack capture in `memory` mode.
    # Set to "true" to disable. Enabled by default on supported runners.
    # Requires runner v5.4.0 or later.
    disable-memory-capture-stack: ""

Outputs

Name Description
run-id The id of the CodSpeed run the results were uploaded to. Requires runner v5.4.0 or later.

Example usage

Python with pytest and pytest-codspeed

This workflow will run the benchmarks found in the tests/ folder and upload the results to CodSpeed.

It will be triggered on every push to the main branch and on every pull request.

name: CodSpeed

on:
  push:
    branches:
      - "main" # or "master"
  pull_request: # required to have reports on PRs
  # `workflow_dispatch` allows CodSpeed to trigger backtest
  # performance analysis in order to generate initial data.
  workflow_dispatch:

jobs:
  benchmarks:
    name: Run benchmarks
    runs-on: ubuntu-latest
    permissions: # optional for public repositories
      contents: read
      id-token: write # for OpenID Connect authentication with CodSpeed
    steps:
      - uses: actions/checkout@v7
      - uses: actions/setup-python@v7
        with:
          python-version: "3.13"

      - name: Install dependencies
        run: pip install -r requirements.txt

      - name: Run benchmarks
        uses: CodSpeedHQ/action@v5
        with:
          mode: simulation
          run: pytest tests/ --codspeed

Rust with cargo-codspeed and codspeed-criterion-compat / codspeed-bencher-compat

This workflow will run the benchmarks found in the tests/ folder and upload the results to CodSpeed.

It will be triggered on every push to the main branch and on every pull request.

name: CodSpeed

on:
  push:
    branches:
      - "main" # or "master"
  pull_request: # required to have reports on PRs
  # `workflow_dispatch` allows CodSpeed to trigger backtest
  # performance analysis in order to generate initial data.
  workflow_dispatch:

jobs:
  benchmarks:
    name: Run benchmarks
    runs-on: ubuntu-latest
    permissions: # optional for public repositories
      contents: read
      id-token: write # for OpenID Connect authentication with CodSpeed
    steps:
      - uses: actions/checkout@v7

      - name: Setup rust toolchain, cache and cargo-codspeed binary
        uses: moonrepo/setup-rust@v1
        with:
          channel: stable
          cache-target: release
          bins: cargo-codspeed

      - name: Build the benchmark target(s)
        run: cargo codspeed build

      - name: Run the benchmarks
        uses: CodSpeedHQ/action@v5
        with:
          mode: simulation
          run: cargo codspeed run

Node.js with codspeed-node, TypeScript and vitest

This workflow will run the benchmarks defined with vitest's bench function and upload the results to CodSpeed.

It will be triggered on every push to the main branch and on every pull request.

name: CodSpeed

on:
  push:
    branches:
      - "main" # or "master"
  pull_request: # required to have reports on PRs
  # `workflow_dispatch` allows CodSpeed to trigger backtest
  # performance analysis in order to generate initial data.
  workflow_dispatch:

jobs:
  benchmarks:
    name: Run benchmarks
    runs-on: ubuntu-latest
    permissions: # optional for public repositories
      contents: read
      id-token: write # for OpenID Connect authentication with CodSpeed
    steps:
      - uses: actions/checkout@v7

      - uses: actions/setup-node@v7

      - name: Install dependencies
        run: npm install

      - name: Run benchmarks
        uses: CodSpeedHQ/action@v5
        with:
          mode: simulation
          run: npx vitest bench

About

Github Actions for running CodSpeed in your CI

codspeed.io

Topics

benchmarkingcicodspeedperformance

Resources

Readme
MIT license
Activity
Custom properties

Stars

55 stars

Watchers

4 watching

Forks

9 forks
Report repository

Releases

Used by

Contributors

Languages

Generated from actions/typescript-action
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.