<commit_before>## Tooling

### Requirements

| Requirement | Purpose               | macOS                |
|-------------|-----------------------|----------------------|
| Go          | Compiler              | brew install go      |
| Docker      | Packaging             | [Docker for Mac]     |
| kubebuilder | Testing               | [kubebuilder docs]   |

[Docker for Mac]: https://store.docker.com/editions/community/docker-ce-desktop-mac
[kubebuilder docs]: https://book.kubebuilder.io/quick-start.html#installation

#### E2E test environments

| Requirement | install docs         |
|-------------|----------------------|
| Minikube    | [Minikube docs]      |
| Kind        | [Kind docs]          |

[Minikube docs]: https://minikube.sigs.k8s.io/docs/start
[Kind docs]: https://kind.sigs.k8s.io/docs/user/quick-start

### Usage

#### Testing

This project uses the built-in testing support for golang.

To run the tests for all go packages outside of the vendor directory, run:
```sh
$ make test
```

To run the e2e tests locally:

```sh
$ make e2e-local
```

**NOTE:** Command `make e2e-local` supports Minikube and Kind environments. If you want to run the e2e tests on Minikube, you need to make sure Minikube is deployed in the local environment. If you want to run the e2e tests on Kind, you need to make sure Kind is deployed in the local environment and switch the kubeconfig to an existing Kind cluster.

To run a specific e2e test locally:

```sh
$ make e2e-local TEST=TestCreateInstallPlanManualApproval
```

#### Building

Ensure your version of go is up to date; check that you're running v1.9 with the
command:
```sh
$ go version
```

To build the go binary, run:
```sh
$ make build
```

#### Packaging

ALM is packaged as a set of manifests for a tectonic-x-operator specialization (tectonic-alm-operator).

A new version can be generated from the helm chart by:

 1. Modifying the `deploy/tectonic-alm-operator/values.yaml` file for the release to include new SHAs of the container images. 
 1. Running the `package` make command, which takes a single variable (`ver`)
 
For example:<commit_msg>Add instructions for setting up envtest and checking go version (#2504)<commit_after>## Tooling

### Requirements

| Requirement | Purpose               | macOS                |
|-------------|-----------------------|----------------------|
| Go          | Compiler              | brew install go      |
| Docker      | Packaging             | [Docker for Mac]     |
| kubebuilder | Testing               | [kubebuilder docs]   |

[Docker for Mac]: https://store.docker.com/editions/community/docker-ce-desktop-mac
[kubebuilder docs]: https://book.kubebuilder.io/quick-start.html#installation

#### E2E test environments

| Requirement | install docs         |
|-------------|----------------------|
| Minikube    | [Minikube docs]      |
| Kind        | [Kind docs]          |

[Minikube docs]: https://minikube.sigs.k8s.io/docs/start
[Kind docs]: https://kind.sigs.k8s.io/docs/user/quick-start

### Usage

#### Testing

This project uses the built-in testing support for golang.

Envtest is also used and needs to be set up. Follow [controller-runtime instructions] and set `KUBEBUILDER_ASSETS` environment variable to point to the installation directory, for instance: `/usr/local/kubebuilder/bin`.

To run the tests for all go packages outside of the vendor directory, run:
```sh
$ make test
```

To run the e2e tests locally:

```sh
$ make e2e-local
```

**NOTE:** Command `make e2e-local` supports Minikube and Kind environments. If you want to run the e2e tests on Minikube, you need to make sure Minikube is deployed in the local environment. If you want to run the e2e tests on Kind, you need to make sure Kind is deployed in the local environment and switch the kubeconfig to an existing Kind cluster.

To run a specific e2e test locally:

```sh
$ make e2e-local TEST=TestCreateInstallPlanManualApproval
```

[controller-runtime instructions]: https://pkg.go.dev/sigs.k8s.io/controller-runtime/tools/setup-envtest#section-readme

#### Building

Ensure your version of go is up to date; check that you're running the same version as in go.mod with the
commands:
```sh
$ head go.mod
$ go version
```

To build the go binary, run:
```sh
$ make build
```

#### Packaging

ALM is packaged as a set of manifests for a tectonic-x-operator specialization (tectonic-alm-operator).

A new version can be generated from the helm chart by:

 1. Modifying the `deploy/tectonic-alm-operator/values.yaml` file for the release to include new SHAs of the container images. 
 1. Running the `package` make command, which takes a single variable (`ver`)
 
For example:
{'fraction_non_alphanumeric': 0.13616930312099187, 'fraction_numerical': 0.006626763574176998, 'mean_word_length': 2.782538399353274, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 9, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1622711', 'n_tokens_mistral': 1433, 'n_tokens_neox': 1343, 'n_words': 526}