Skip to content

Latest commit

 

History

History
142 lines (94 loc) · 3.04 KB

BUILD.md

File metadata and controls

142 lines (94 loc) · 3.04 KB

BUILD

Table of contents

3.3. Tests

3.3.1 E2E

About

The BUILD.md is a file to check the environment and build specifications of horusec-cli project.

Environment

Development

Use a command-line interface (CLI) of your choice to run the following commands to download and install the dependencies.

Install and Run

From the root of the project, run the command below to download the dependencies:

go mod download

The command below build the Horusec cli for development:

make build-dev

After build successful you can execute running:

./horusec

Or on Windows:

horusec

Style Guide

There is a pattern for the source code and the golangci-lint tool is used as an aggregator to the Golang's linter. You can check lint through the make command, see it below:

make lint

The project also has a dependency import stardard, and the command below organizes your code in the stardard definied:

make format

All project files must have the license header. To check if all files are in agreement, run the command:

make license

If you need to add the license in any file, the command below inserts it in all files that do not have it:

make license-fix

Tests

The source code has two test segments, E2E and unitary test.

E2E

The e2e tests were writen with the packages:

You can run the tests by the command below:

make test-e2e

Unitary Tests

The unit tests were written with the Golang standard package and some mock and assert snippets, we used the testify. You can run the tests using the command below:

make test

To check test coverage, run the command below:

make coverage

Security

Horusec uses the latest version to keep our source code safe. You can verify using the command below:

make security

Production

Run the commands below in your project's root according to your Operating System to create Horusec's binary:

  • Windows

    make build-install-cli-windows
  • Linux

    make build-install-cli-linux
  • MacOs

    make build-install-cli-darwin