Allow env file with "bazel test"
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
Currently, you can pass environment variables one at a time with `--test_env`. It would be nice to be able to pass an entire file of env variables to bazel test with something like:
```
bazel test --test_env_file=.env //...
```
env are becoming semi-standard, and lots of tools understand how to read them. For example:
- `docker run --env-file`
- `foreman --env`
- https://github.com/bkeepers/dotenv
This improvement would allow people to use their existing env files with bazel.
Contributor guide
Research direction
Start with Bazel's `test` command and the existing `--test_env` handling described in the issue. The payload names no implementation files or tests, so first locate those entry points and determine the supported environment-file syntax; done means `bazel test --test_env_file=.env //...` loads the file consistently with individual environment options.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100