Skip to content

Commit 6cfdca7

Browse files
authored
Use pytest-dotenv to set env vars for testing (#92)
* Add pytest-dotenv for setting test env vars * Rename lint and test workflow files * Remove env vars from test workflow
1 parent b8dc0b5 commit 6cfdca7

File tree

4 files changed

+25
-8
lines changed

4 files changed

+25
-8
lines changed
File renamed without changes.

.github/workflows/test-build.yaml renamed to .github/workflows/test.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ on: pull_request
55
jobs:
66
run_test:
77
runs-on: ubuntu-latest
8-
env:
9-
JIRA_USERNAME: fake_jira_username
10-
JIRA_API_KEY: fake_jira_api_key
11-
BUGZILLA_API_KEY: fake_bugzilla_api_key
128
steps:
139
- uses: actions/checkout@v3
1410
- name: Install poetry

poetry.lock

Lines changed: 20 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ pylint = "^2.7.2"
3333
pylint-pytest = "^1.1.2"
3434
pytest = "^7.0.0"
3535
yamllint = "^1.26.3"
36+
pytest-dotenv = "^0.5.2"
3637

3738
[build-system]
3839
requires = ["poetry-core>=1.0.0"]
@@ -42,6 +43,10 @@ build-backend = "poetry.core.masonry.api"
4243
testpaths = [
4344
"tests/unit",
4445
]
46+
env_override_existing_values = true
47+
env_files = [
48+
"infra/config/local_dev.env"
49+
]
4550

4651
[tool.pylint]
4752
[tool.pylint.'MESSAGES CONTROL']

0 commit comments

Comments
 (0)