Skip to content

Commit

Permalink
Add MkDoxy build workflow for all supported Python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
JakubAndrysek committed Apr 2, 2024
1 parent 6cdeac4 commit 2742273
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 31 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/mkdoxy-pytest-repo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: MkDoxy build all supported Python versions

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest] # windows-latest, macos-latest requires doxygen to be installed manually
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
sudo apt-get install doxygen
- name: Run Pytest
run: |
pytest tests/
58 changes: 30 additions & 28 deletions .idea/workspace.xml

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

3 changes: 2 additions & 1 deletion mkdoxy/doxyrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ def setDoxyCfg(self, doxyCfgNew: dict) -> dict:
@details - SHOW_NAMESPACES: YES
@details - GENERATE_HTML: NO
@details - GENERATE_LATEX: NO
@param doxyCfgNew: (dict) New Doxygen config options that will be added to the default config (new options will overwrite default options)
@param doxyCfgNew: (dict) New Doxygen config options that will be
added to the default config (new options will overwrite default options)
@return: (dict) Doxygen configuration.
"""
doxyCfg = {}
Expand Down
13 changes: 11 additions & 2 deletions tests/test_doxyrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ def test_dox_dict2str():

result = doxygen_run.dox_dict2str(dox_dict)

expected_result = "DOXYFILE_ENCODING = UTF-8\nGENERATE_XML = YES\nRECURSIVE = YES\nEXAMPLE_PATH = examples\nSHOW_NAMESPACES = YES\nGENERATE_HTML = NO\nGENERATE_LATEX = NO"
expected_result = (
"DOXYFILE_ENCODING = UTF-8\nGENERATE_XML = YES"
"\nRECURSIVE = YES\nEXAMPLE_PATH = examples"
"\nSHOW_NAMESPACES = YES\nGENERATE_HTML = NO"
"\nGENERATE_LATEX = NO"
)

assert result == expected_result

Expand Down Expand Up @@ -56,7 +61,11 @@ def test_set_doxy_cfg_custom_file():


def test_str2dox_dict():
dox_str = "DOXYFILE_ENCODING = UTF-8\nGENERATE_XML = YES\nRECURSIVE = YES\nEXAMPLE_PATH = examples\nSHOW_NAMESPACES = YES\nGENERATE_HTML = NO\nGENERATE_LATEX = NO"
dox_str = (
"DOXYFILE_ENCODING = UTF-8\nGENERATE_XML = YES\n"
"RECURSIVE = YES\nEXAMPLE_PATH = examples\n"
"SHOW_NAMESPACES = YES\nGENERATE_HTML = NO\nGENERATE_LATEX = NO"
)

doxygen_run = DoxygenRun(
doxygenBinPath="doxygen",
Expand Down

0 comments on commit 2742273

Please sign in to comment.