Skip to content

Commit

Permalink
gh workflows: run tests on python/ironic-understack too
Browse files Browse the repository at this point in the history
  • Loading branch information
skrobul committed Aug 29, 2024
1 parent 05a4d63 commit 3c434b5
Show file tree
Hide file tree
Showing 3 changed files with 157 additions and 7 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/code-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ on:
branches:
- main
paths:
- "python/**"
- "python/ironic-understack/**"
- "python/understack-workflows/**"
- ".github/workflows/code-test.yaml"
pull_request:
paths:
- "python/**"
- "python/ironic-understack/**"
- "python/understack-workflows/**"
- ".github/workflows/code-test.yaml"
workflow_dispatch:

Expand All @@ -34,3 +36,23 @@ jobs:
with:
coverageFile: python/understack-workflows/coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
ironic-understack:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./python/ironic-understack

steps:
- uses: actions/checkout@v4
- run: pipx install poetry==1.7.1 && poetry self add 'poetry-dynamic-versioning[plugin]'
- uses: actions/setup-python@v5
with:
python-version-file: python/ironic-understack/pyproject.toml
cache: "poetry"
- run: poetry install --sync --with test
- run: poetry build
- run: "poetry run pytest --cov-report xml:coverage.xml"
- uses: orgoro/[email protected]
with:
coverageFile: python/ironic-understack/coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
127 changes: 123 additions & 4 deletions python/ironic-understack/poetry.lock

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

11 changes: 10 additions & 1 deletion python/ironic-understack/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ ironic = "^24.1"
python = "^3.8"
pyyaml = "^6.0"

[tool.poetry.group.dev.dependencies]
[tool.poetry.group.test.dependencies]
pytest = "^8.3.2"
pytest-github-actions-annotate-failures = "*"
pytest-cov = "^5.0.0"

[build-system]
requires = ["poetry-core"]
Expand All @@ -27,3 +29,10 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry.plugins."ironic.hardware.interfaces.inspect"]
"redfish-understack" = "ironic_understack.redfish_inspect_understack:UnderstackRedfishInspect"
"idrac-redfish-understack" = "ironic_understack.redfish_inspect_understack:UnderstackDracRedfishInspect"

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra --cov=ironic_understack"
testpaths = [
"tests",
]

0 comments on commit 3c434b5

Please sign in to comment.