Time and group logs for GitHub actions
Project description
gha_timer
Time and group logs for GitHub actions
Quickstart
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:
poetry run gha_timer hello --name Fulcrum
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 hello --name Fulcrum
Development and Testing
See the contributing guide for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gha_timer-0.1.0.tar.gz.
File metadata
- Download URL: gha_timer-0.1.0.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8afd72fa4d756219c50118bc0346cf16353bf56008907df94530d43a33802180
|
|
| MD5 |
ed72617c74aa1f17fed39da114274c30
|
|
| BLAKE2b-256 |
a465f230abc5e6c3f678733d4a89ea95e5d163f727ea75ac859b8f892e0b541a
|
Provenance
The following attestation bundles were made for gha_timer-0.1.0.tar.gz:
Publisher:
publish_gha_timer.yml on fulcrumgenomics/gha-timer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gha_timer-0.1.0.tar.gz -
Subject digest:
8afd72fa4d756219c50118bc0346cf16353bf56008907df94530d43a33802180 - Sigstore transparency entry: 185983410
- Sigstore integration time:
-
Permalink:
fulcrumgenomics/gha-timer@8a79a7902c2e0f565b720ccc6265656b59f10447 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/fulcrumgenomics
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_gha_timer.yml@8a79a7902c2e0f565b720ccc6265656b59f10447 -
Trigger Event:
push
-
Statement type:
File details
Details for the file gha_timer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gha_timer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec5480e8feeef76067b7770a26df20e0d99810049b35523adb301d59b8cac7df
|
|
| MD5 |
ceedcac2e0ca0078dd03682fcb06150c
|
|
| BLAKE2b-256 |
e233e7f217422bede86df8d751fefa88c6c1a2412c1e68d7f0ec0bd0b497124e
|
Provenance
The following attestation bundles were made for gha_timer-0.1.0-py3-none-any.whl:
Publisher:
publish_gha_timer.yml on fulcrumgenomics/gha-timer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gha_timer-0.1.0-py3-none-any.whl -
Subject digest:
ec5480e8feeef76067b7770a26df20e0d99810049b35523adb301d59b8cac7df - Sigstore transparency entry: 185983414
- Sigstore integration time:
-
Permalink:
fulcrumgenomics/gha-timer@8a79a7902c2e0f565b720ccc6265656b59f10447 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/fulcrumgenomics
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_gha_timer.yml@8a79a7902c2e0f565b720ccc6265656b59f10447 -
Trigger Event:
push
-
Statement type: