New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

canary-runner

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

canary-runner

Run all tests of a list of repositories

  • 1.2.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Canary Runner

Run all tests for a list of repositories, and summarise the results.

Supports tests written with brittle. Should work with other tests too, as long as they report their output in TAP format.

Install

npm install -g canary-runner

Usage

See canary --help.

Set the CANARY_PAT environment variable if you want to access private repositories over https (see CI-usage section)

Examples:

# run the tests of some-repo
canary holepunchto/some-repo

# run all tests of a list of repositories (the config should be stored in a .json in a github repository)
canary --config holepunchto/some-repo/repos.json

# run the canary but use your local folder with hypercore as hypercore
canary holepunchto/some-repo --overwrite hypercore=./my-dev/hypercore

# run the canary on 2 repos
canary holepunchto/some-repo holepunchto/some-other-repo

Or any mix of the above

CI Usage

CLI usage relies on SSH for accessing private repositories, which works fine on your own machine.

For CI usage, define a github PAT with read rights to the repositories you will test, and store it as a secret accessible from the repository where the CI lives.

Example usage:

    - run: npm install canary-runner
    - run: npx canary --config holepunchto/canary-tests/repos.json # Replace with your own config
      env:
        CANARY_PAT: ${{ secrets.CANARY_READ_REPOS_PAT }} # Ensure this secret exists and is a valid PAT
        NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      working-directory: ${{ github.workspace }} # Where the checkout action checked it out

Config format

An example .json config format (for the --config flag):

{
  "holepunchto/hypercore": {},
  "holepunchto/hyperbee": {},
  "holepunchto/hyperdht": {
    "additionalNpmScripts": [
      "integration"
    ]
  }
}

The entries under additionalNpmScripts will all be run (as npm run <entryname>). npm run test is always run and need not be specified.

Keywords

FAQs

Package last updated on 19 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc