currents run get
Get the data of a Currents run by CI build ID, or the last run of a branch or tag, with the currents run get command
currents run get gets the data of a run from the Currents REST API and prints it as JSON. It finds the run by its CI Build ID, or the last run of a branch, a tag or both.
Usage
Run the commands on this page in a project that installs @currents/cmd. Elsewhere, replace npx currents with npx --package @currents/cmd@2 currents.
Get the run recorded under a CI build ID and save it to a file:
npx currents run get --api-key <api-key> --project-id <project-id> --ci-build-id <ci-build-id> --output run.jsonGet the last run of a branch with the tags tagA and tagB:
npx currents run get --api-key <api-key> --project-id <project-id> --branch <branch> --tag tagA,tagBSave the failed tests of a run where Playwright reads them, for playwright test --last-failed:
npx currents run get --api-key <api-key> --project-id <project-id> --ci-build-id <ci-build-id> --pw-last-run --output test-results/.last-run.jsonThe output is the data of the run in the REST API. Without --output, the JSON is the only output on stdout, so you can pipe it to another command.
Options
--api-key <api-key>
CURRENTS_API_KEY
An API key from the Currents dashboard. Required.
-p, --project-id <id>
CURRENTS_PROJECT_ID
The project ID from the Currents dashboard. Required.
--ci-build-id <id>
CURRENTS_CI_BUILD_ID
The CI build ID the run was recorded with. It cannot be combined with --branch or --tag. The environment variable is ignored when --branch or --tag is set.
-b, --branch <branch>
Find the last run of this git branch.
-t, --tag <tag>
Find the last run with these tags. Comma-separated or repeated.
-o, --output <path>
CURRENTS_OUTPUT
Write the JSON to this file instead of stdout.
--pw-last-run
Print only the status and the failed tests of the run, in the format of Playwright's .last-run.json.
--debug
CURRENTS_DEBUG
Print debug logs. Keys are hidden in them. Default: false.
To get other data, such as a list of runs, use currents api.
Last updated
Was this helpful?