Skip to content

Commit

Permalink
Fix installing dependencies for tox
Browse files Browse the repository at this point in the history
Also removes building docs from CI which is already handled by
readthedocs even on pull requests.
  • Loading branch information
hluk committed Apr 15, 2024
1 parent 940f88a commit 97fe938
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 204 deletions.
16 changes: 3 additions & 13 deletions .github/workflows/gating.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,10 @@ jobs:
libsasl2-dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry tox tox-gh-actions
run: python -m pip install tox

- name: Test with tox
run: tox -e py
run: python -m tox -e py3

- name: Run coveralls-python
env:
Expand All @@ -52,14 +50,6 @@ jobs:
pip3 install --upgrade coveralls==3.2.0
coveralls --service=github
- name: Set up Python for documentation build
uses: actions/setup-python@v4
with:
python-version: "3.8"

- name: Test building documentation with tox
run: tox -e docs

coveralls-finish:
name: Finish coveralls-python
needs: tests
Expand Down Expand Up @@ -139,7 +129,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry tox tox-gh-actions podman-compose
pip install poetry podman-compose
- name: Update the Application Version
run: poetry version "$(./get-version.sh)"
Expand Down
183 changes: 2 additions & 181 deletions poetry.lock

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

3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,9 @@ fedora-messaging = "^3.4.1"
"stomp.py" = "^8.1.0"

# Tests
flake8 = {version = "^5.0.4", optional = true}
pytest = {version = "^8.0.2", optional = true}
pytest-cov = {version = "^4.0.0", optional = true}
mock = {version = "^5.1.0", optional = true}
tox = {version = "^4.13.0", optional = true}

# Tracing
opentelemetry-api = "^1.24.0"
Expand All @@ -93,7 +91,6 @@ flask-restx = "^1.3.0"

[tool.poetry.extras]
test = [
"flake8",
"pytest",
"pytest-cov",
"mock",
Expand Down
18 changes: 11 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
[tox]
envlist = bandit,lint,py3,docs
isolated_build = True
requires =
poetry

[testenv]
extras =
test
allowlist_externals = poetry
skip_install = true
no_package = true

[testenv:py3]
commands_pre =
poetry install --only=main --extras=test
commands =
pytest \
--cov-reset \
Expand All @@ -16,7 +22,6 @@ commands =
{posargs}

[testenv:bandit]
skip_install = true
deps =
bandit
commands =
Expand All @@ -28,8 +33,8 @@ commands =
# Same Python version as in .readthedocs.yaml
basepython = python3.11
changedir = docs
extras =
docs
commands_pre =
poetry install --only=main --extras=docs
allowlist_externals =
mkdir
rm
Expand All @@ -39,7 +44,6 @@ commands=
sphinx-build -W -b html -d {envtmpdir}/doctrees . _build/html

[testenv:lint]
skip_install = true
deps =
flake8
commands =
Expand Down

0 comments on commit 97fe938

Please sign in to comment.