mirror of
https://github.com/onyx-and-iris/obsws-cli.git
synced 2026-04-18 06:53:38 +00:00
use hatch-dotenv plugin to load env vars for tests
fail fast if .test.env is not found
This commit is contained in:
@@ -35,6 +35,9 @@ obsws-cli = "obsws_cli:app"
|
||||
[tool.hatch.version]
|
||||
path = "obsws_cli/__about__.py"
|
||||
|
||||
[tool.hatch.env]
|
||||
requires = ["hatch-dotenv"]
|
||||
|
||||
[tool.hatch.envs.default]
|
||||
dependencies = ["click-man>=0.5.1"]
|
||||
|
||||
@@ -45,6 +48,10 @@ man = "python man/generate.py --output=./man"
|
||||
[tool.hatch.envs.hatch-test]
|
||||
randomize = true
|
||||
|
||||
[tool.hatch.env.collectors.dotenv.hatch-test]
|
||||
env-files = [".env", ".test.env"]
|
||||
fail-on-missing = true
|
||||
|
||||
[tool.hatch.envs.types]
|
||||
extra-dependencies = ["mypy>=1.0.0"]
|
||||
[tool.hatch.envs.types.scripts]
|
||||
|
||||
Reference in New Issue
Block a user