Skip to content

Unable to run codspeed inside docker container #104

@finsberg

Description

@finsberg

Hi!

I am trying to use codspeed for the first time using GitHub action, but for some reason I cannot get it to work. One difference from the example online is that I need to run it inside a docker container. Here is the relevant PR: finsberg/fenicsx-pulse#39

Running the tests locally works fine.

Here is my GitHub actions .yml file

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:

jobs:
  benchmarks:
    runs-on: ubuntu-22.04
    container: ghcr.io/fenics/dolfinx/dolfinx:nightly
    env:
      DEB_PYTHON_INSTALL_LAYOUT: deb_system

    steps:
      - uses: actions/checkout@v4

      - name: Install package needed by codspeed
        run: apt-get update && apt-get install -y curl

      - name: Install package
        run: python3 -m pip install -e .[benchmark]

      - name: Run benchmarks
        uses: CodSpeedHQ/action@v2
        with:
            
            token: ${{ secrets.CODSPEED_TOKEN }}
            run: python3 -m pytest tests/ --codspeed

Also, here are the logs from the run,

logs.txt

and it looks like the command

head_status=$(curl -I -fsSL -w "%{http_code}" -o /dev/null https://github.com/CodSpeedHQ/runner/releases/download/v$RUNNER_VERSION/codspeed-runner-installer.sh)

returns 404, which probably means that $RUNNER_VERSION is not set correctly. Any ideas on how to proceed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions