Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Latest commit

 

History

History
92 lines (67 loc) · 3.44 KB

CONTRIBUTING.md

File metadata and controls

92 lines (67 loc) · 3.44 KB

Contributing Guide

Signing the CLA

In order to contribute code you need to sign the CLA which makes it possible for us to release this code as AGPL but consume it internally in a different license.

If you have any issues with the CLA or signing it please contact us ([email protected] / [email protected]) directly.

Technical Know-How

This monorepo is managed with yarn workspaces.
The codebase is written with TypeScript, and linted using ESLint.
It's recommended to have proper IDE integration with the tools in use (eslint, prettier, editorconfig) before modifying the code

Prerequisite

Installing Dependencies

The first step for local development would be to install dependencies:

# install dependencies
yarn

Running the tests

To run the whole test suite:

yarn test

On a clean clone, the tests are supposed to pass. If they don't, please let us know!

You can also run per package tests:

cd packages/root-cause-jest
yarn test
yarn root-cause ls;

Building

There is no need to run any build step when running tests or internal examples, the needed transpilation/build is happening on the fly.
To achieve that, we make extensive use of ts-node in various ways.

To see how we build for publishing, go over our .circleci/config.yml

To run jest local example:

cd packages/jest-tester-and-example
yarn test
yarn root-cause ls;

Because the project is still in pretty early stage, if you want to contribute but unsure how please contact us.

Please note our code of conduct. We take it seriously and we value diverse contributions and have a zero tolerance policy towards discrimination of any kind.

root-cause cli while developing

yarn 1 does not link bin files between workspaces. So we've added package scripts to be used instead while developing. That means you can simply run yarn root-cause as expected.

// package.json
"root-cause": "ts-node ../root-cause-core/lib/cli",
"rc": "ts-node ../root-cause-core/lib/cli"

Viewer UI/frontend development

The viewer UI is a create-react-app(CRA) project, found in packages/client.

When working on the UI, the recommended workflow would be:

  • Run some test that will create root cause results
  • Open the root cause viewer in one terminal tab, and pick the result you want, and keep it running
  • Start CRA watch mode in another terminal tab: yarn workspace @testim/root-cause-client-bundled start (or yarn start from inside the client directory)

Issues

If you've encountered any unexpected error in that above steps, please let us know!

Publish workflow

We use lerna for publishing.

We use lerna canary publish for PRs.

To release prod packages, we use lerna from-git workflow.
You need to run lerna version locally on master branch. it will create version commit, tags and push it to the git remote

Our versioning strategy is dependent and not independent. means all of the released packages will have the same version. We are not semver compatible yet! keep version number below 1.0