Skip to main content

gha-timer

PyPI Release CI Python Versions MyPy Checked Poetry Ruff

Time and group logs for GitHub actions

Fulcrum Genomics

Visit us at Fulcrum Genomics to learn more about how we can power your Bioinformatics with gha-timer and beyond.

Motivation

This GitHub action and associated command-line tool enable log grouping and printing of the elapsed time of that log group, with colored icons next to the elapsed based on the provided outcome (success, failure, cancelled, or skipped).

Fulcrum Genomics

Usage

jobs:
  job:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: fulcrumgenomics/gha-timer@v1
      - id: example
        shell: bash
        run: |
          gha-timer start --name build
          ... do something
          gha-timer elapsed --name build

Inputs

- uses: fulcrumgenomics/gha-timer@v1
  with:
    # The color of the success outcome
    # Default: green
    success-color: ''

    # The icon to use for the success outcome
    # Default: ✓
    success-icon: ''

    # The color of the failure outcome
    # Default: red
    failure-color: ''

    # The icon to use for the failure outcome
    # Default: ✕
    failure-icon: ''

    # The color of the cancelled outcome
    # Default: yellow
    cancelled-color: ''

    # The icon to use for the cancelled outcome
    # Default: ✕
    cancelled-icon: ''

    # The color of the skipped outcome
    # Default: gray
    skipped-color: ''

    # The icon to use for the skipped outcome
    # Default: ✕
    skipped-icon: ''

    # Skip emitting the banner
    # Default: false
    skip-banner: ''

Outputs

There are currently no outputs

Command Line Tool

Quickstart

Install command line tool:

pip install gha-timer

Start a timer:

$ gha-timer start

Get the elapsed time:

$ gha-timer elapsed --outcome success
                                                                      ✓ 10.8s
$ gha-timer elapsed --outcome failure
                                                                      ✕ 20.2s
$ gha-timer elapsed --outcome cancelled
                                                                      ✕ 33.6s
$ gha-timer elapsed --outcome skipped  
                                                                      ✕ 37.3s

Stop the timer:

$ gha-timer stop

Use the --name option to add group log lines:

$ gha-timer start --name "Build the project"
::group::Build the project
$ gha-timer elapsed --outcome success --name "Build the project"
::endgroup::Build the project
                                                                      ✓ 19.2s

Specify a custom configuration file with --config (or just create a ~/.timerrc) to control the color and icon for each outcome (steps.<step_id>.outcome: success, failure, cancelled, or skipped). Below is the default configuration:

success:
  color: green
  icon: "✓"
failure:
  color: red
  icon: "✕"
cancelled:
  color: yellow
  icon: "✕"
skipped:
  color: gray
  icon: "✕"

Supported colors are: red, green, yellow, blue, cyan, bright_red, bright_green, white, gray, and bg_grey.

Recommended Installation

Install the Python package and dependency management tool poetry using official documentation. You must have Python 3.11 or greater available on your system path, which could be managed by mamba, pyenv, or another package manager. Finally, install the dependencies of the project with:

poetry install

To check successful installation, run:

gha-timer --help

Installing into a Mamba Environment

Install the Python package and dependency management tool poetry and the environment manager mamba using official documentation. Create and activate a virtual environment with Python 3.11 or greater:

mamba create -n gha_timer python=3.11
mamba activate gha_timer

Then, because Poetry will auto-detect an activated environment, install the project with:

poetry install

To check successful installation, run:

$ gha-timer start
$ gha-timer elapsed --outcome success
$ gha-timer stop

Development and Testing

See the contributing guide for more information.

Metadata

Release files for gha-timer 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gha-timer 1.1.1
File Size Uploaded Provenance Actions
gha_timer-1.1.1.tar.gz 10.9 kB With provenance Details for gha_timer-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gha-timer 1.1.1
File Interpreter ABI Platform Actions
gha_timer-1.1.1-py3-none-any.whl Python 3 none any Details for gha_timer-1.1.1-py3-none-any.whl

Total release size: 20.3 kB

Release files / gha_timer-1.1.1.tar.gz

Download URL gha_timer-1.1.1.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
cdad48bd03b9e5a9c5c22274c5752f126448c732d7d0bd9d880983c63a97cc6c
BLAKE2b-256 checksum
How to use checksums
967a94e5346539a0fce6c2cfa8e365326444449c9e99ed595ffbb94ea6462a1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 21, 2026.

Transparency log

Release files / gha_timer-1.1.1-py3-none-any.whl

Download URL gha_timer-1.1.1-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7d9f58d94fc56765648267b177d148cb36602aa7249e94d2f4e144e5b2555f91
BLAKE2b-256 checksum
How to use checksums
c310f5984807879c9d8c2a416ad03e8f234dd1e0db241aa48b15cdc926290d86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 21, 2026.

Transparency log

Security for gha-timer 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gha_timer-1.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page