Skip to content

Commit

Permalink
Fix missing packages during tox execution
Browse files Browse the repository at this point in the history
  • Loading branch information
hluk committed Apr 11, 2024
1 parent fa7d254 commit 218ec37
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 50 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/resultsdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install --no-root --extras=test
python -m pip install poetry
poetry install --only=dev
- name: Test with tox
run: poetry run tox
run: poetry run python -m tox

- name: Run coveralls-python
env:
Expand Down
66 changes: 33 additions & 33 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ fedora-messaging = "^3.4.1"

pytest = {version = "^8.0.2", optional = true}
pytest-cov = {version = "^5.0.0", optional = true}
tox = {version = "^4.13.0", optional = true}
tox-docker = {version = "^4.0.0", optional = true}

Flask-SQLAlchemy = "^3.1.1"
SQLAlchemy = {version = "^2.0.24"}
Expand All @@ -54,12 +52,14 @@ tenacity = "^8.2.3"

mod-wsgi = "^5.0.0"

[tool.poetry.group.dev.dependencies]
tox = "^4.13.0"
tox-docker = "^4.0.0"

[tool.poetry.extras]
test = [
"pytest",
"pytest-cov",
"tox",
"tox-docker",
]

[tool.poetry.scripts]
Expand Down
4 changes: 2 additions & 2 deletions tox-podman.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ podman system service --time=0 "$DOCKER_HOST" &
podman_service_pid=$!
sleep 1

poetry install --no-root --extras=test
poetry run tox "$@"
poetry install --only=dev
poetry run python -m tox "$@"
19 changes: 12 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
envlist = py3,mypy
requires = tox-docker
isolated_build = True
skip_install = true
skipsdist = true

[pytest]
minversion=2.0
Expand All @@ -10,24 +12,27 @@ python_files=test_* functest_*
addopts=--functional tests/ --cov resultsdb --cov-report=term-missing

[testenv:mypy]
skip_install = true
deps =
mypy
commands =
mypy -p resultsdb --install-types --non-interactive --ignore-missing-imports

[testenv:py3-nodocker]
extras =
test
commands = python -m pytest {posargs}
allowlist_externals = poetry
commands_pre =
poetry install --extras=test
commands =
poetry run python -m pytest {posargs}
setenv =
NO_CAN_HAS_POSTGRES = 1

[testenv:py3]
docker = resultsdb-postgres
extras =
test
commands = python -m pytest {posargs}
allowlist_externals = poetry
commands_pre =
poetry install --extras=test
commands =
poetry run python -m pytest {posargs}
setenv =
POSTGRES_5432_TCP = 15432
passenv =
Expand Down

0 comments on commit 218ec37

Please sign in to comment.