How can I source a bash script that contains exports for environment variables?
env.sh
...
export VARIABLE=test
...
test_file.py
...
os.environ['VARIABLE'] # Throws KeyError
...
How can I use pre-commit to run env.sh to setup an environment that the following pytest hook can use?
- repo: local
hooks:
- id: tests
name: run tests
entry: pytest -v
language: system
types: [python]