Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs building and testing #276

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 23 additions & 18 deletions .config/dictionary.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
-CAcreateserial
-Djava
ARGSPEC
AUTHS
Abhijeet
Alina
Buzachis
EDAHTTP
FQCN
GSSAPI
Kasurde
Nikhil
OAUTHBEARER
PYTHONUNBUFFERED
Passw
akasurde
alertmanager
alinabuzachis
antsibull
auths
basepython
benthomasosn
bindep
buildx
cafile
capath
caroot
cliconf
confluentinc
conninfo
containerd
Expand All @@ -21,19 +36,25 @@ dynatrace
envlist
extfile
finito
hdrs
healthcheck
httpapi
jaas
jainnikhil
keygen
keypass
keytool
libsystemd
mydb
myqueue
nada
netconf
noprompt
parseable
posargs
pythonmain
realworld
refspec
rulebook
rulebooks
ruleset
Expand All @@ -42,24 +63,8 @@ skipsdist
snakeoil
storepass
testenv
testsecret
testuser
toxinidir
trustore
truststore
ARGSPEC
Nikhil
jainnikhil
Abhijeet
Kasurde
akasurde
auths
Passw
AUTHS
EDAHTTP
refspec
Alina
Buzachis
alinabuzachis
hdrs
testuser
testsecret
keygen
7 changes: 5 additions & 2 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ jobs:
min_python: "3.9"
max_python: "3.12"
default_python: "3.9"
# Wwe run sanity with 3 different versions of ansible as the result
# We run sanity with 3 different versions of ansible as the result
# can be different. Each of them is testing with all supported
# python versions, regardless the tox pyXY name.
other_names: |
lint-sanity:tox -e lint;tox -e py39-sanity-ansible2.15;tox -e py310-sanity-ansible2.16;tox -e py311-sanity-ansible2.17
lint-docs-sanity:tox -e lint;tox -e docs;tox -e py39-sanity-ansible2.15;tox -e py310-sanity-ansible2.16;tox -e py311-sanity-ansible2.17
py39:tox -e py39-unit;tox -e py39-integration;tox -e coverage
py310:tox -e py310-unit; tox -e py310-integration;tox -e coverage
py311:tox -e py311-unit; tox -e py311-integration;tox -e coverage
Expand Down Expand Up @@ -130,6 +130,9 @@ jobs:
- run: ${{ matrix.command4 }}
if: ${{ matrix.command4 }}

- run: ${{ matrix.command5 }}
if: ${{ matrix.command5 }}

- name: Archive logs
uses: actions/upload-artifact@v4
with:
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ tests/integration/event_source_kafka/*.jks
# Coverage
.coverage*
*coverage.combined
# docs/requirements.txt
docs/build.sh
docs/antsibull-docs.cfg
docs/conf.py
5 changes: 4 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ ci:
- ansible-test-sanity # requires network access
- shellcheck # no docker
- tox # requires network access
exclude: "^.*\\.md$"
exclude: >
(?x)^(
docs/rst/.*.rst$
)$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
Expand Down
26 changes: 26 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-24.04
tools:
python: "3.12"
# When using commands we canon install apt_package due to
# https://github.com/readthedocs/readthedocs.org/issues/11219
# https://github.com/readthedocs/readthedocs.org/issues/9599
# apt_packages:
# - rsync
commands:
# Copy executable in the first directory in path, which happens to be writable on RTD
- mkdir -p ${PATH%%:*}
- cp docs/bin/rsync ${PATH%%:*}/
- rsync --version
- pip install --user tox
- python3 -m tox -e docs
- mkdir -p $READTHEDOCS_OUTPUT
- cp -r docs/build/html ${READTHEDOCS_OUTPUT}/
3 changes: 3 additions & 0 deletions bindep.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ libsystemd0 [test platform:debian]
libsystemd-dev [test platform:debian]
pkg-config [test platform:debian]

# docs
rsync [test platform:debian]

# For sanity testing to pass we need all supported Python versions installed:
python3.9-dev [test platform:ubuntu-noble]
python3.9-venv [test platform:ubuntu-noble]
Expand Down
2 changes: 1 addition & 1 deletion demos/dynatrace-demo/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ rulebook CLI runs a remedy playbook to restart the process.
### Nodes or instances
* Rulebook Node: The node where the ansible-rulebook CLI is running
* Client Node: The node where the monitored process is running
* Dynatrace Console: An active Dyntrace tenant and its web console
* Dynatrace Console: An active Dynatrace tenant and its web console

### Set up client node
1. Prepare a VM with host name called `lamp`
Expand Down
8 changes: 8 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later

# Created with antsibull-docs 2.12.0

/temp-rst
/build
2 changes: 2 additions & 0 deletions docs/bin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This rsync static build binary is solely used on RTD build due to
https://github.com/readthedocs/readthedocs.org/issues/9599
Binary file added docs/bin/rsync
Binary file not shown.
10 changes: 10 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later

# Created with antsibull-docs 2.12.0

antsibull-docs >= 2.0.0, < 3.0.0
ansible-pygments
sphinx
sphinx-ansible-theme >= 0.9.0
Loading