bevaluate

command module
v0.0.0-...-522a375 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2023 License: MIT Imports: 8 Imported by: 0

README

Go codecov

Go-Lean BEvaluate

Install

go install github.com/go-lean/bevaluate@latest

About

BEvaluate is a tool aiming to drastically optimise the testing and deployment for GO source code hosted inside a monorepo project. Evaluating the need of packages to be retested and redeployed after a change to the codebase can make the difference between having a build that only takes a few minutes and waiting for your entire codebase to be retested and redeployed.

Convention

In a monorepo typically there is one root folder containing the go module file and a number of sub-folders with different packages, some of which could also be deployed in a certain step of your CI/CD process.

Expected structure

Some aspects of the structure, like the name of the deployments folder, can be configured, meaning you can skip having a deployments folder all together, but it is still expected to have a root folder containing all packages and the module file.

root
  - cmd // optional deployments dir
    - service
      Dockerfile
      main.go
  - service
    server.go
    server_test.go
  - response
    response.go
    response_test.go
go.mod

Evaluation

The process of evaluating the packages consists of several steps. First all packages are being recursively parsed and their dependencies stored are collected. Next the dependencies of each package are used to build a dependants graph. This graph is the key to determining whether a change in one package would affect the testing or deployment of dependant packages.

Init

If you want to use the tool with the default settings you can skip this step. However, it is quite useful to specify custom scenarios according to your needs, so once you have successfully installed to tool you can run the init command.

bevaluate init

This will create the config file in the root directory under the name of bevaluate.yaml using the default settings.

packages:
    ignored_dirs: [build$, vendor$, .*/mocks$]
evaluations:
    deployments_dir: cmd/
    retest_out: bevaluate/retest.out
    redeploy_out: bevaluate/redeploy.out
    special_cases:
        retest_triggers: []
        full_scale_triggers: [go.mod$]

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL