canonical / data-platform-workflows

Reusable GitHub Actions workflows used by the Data Platform team
Apache License 2.0
3 stars 9 forks source link

patch(integration_test_charm.yaml): Add Allure "unknown" status for tests with missing results #183

Closed carlcsaposs-canonical closed 1 month ago

carlcsaposs-canonical commented 1 month ago

Generate default results with "unknown" status for every test so that if Allure report is missing (because runner set up failed or integration tests timed out) that those tests show up as "unknown" instead of being omitted from Allure report

Breaking change for Allure users (Allure is in beta & not part of public interface, hence patch PR prefix instead of breaking): allure-pytest-collection-report plugin now required, see .github/workflows/integration_test_charm_allure_beta.md

carlcsaposs-canonical commented 1 month ago

tested on https://github.com/carlcsaposs-canonical/mysql-router-k8s-operator/actions/runs/9414578644/job/25934474648 https://carlcsaposs-canonical.github.io/mysql-router-k8s-operator/80/ a

carlcsaposs-canonical commented 1 month ago

tested again with rebase on #179 on https://github.com/carlcsaposs-canonical/mysql-router-k8s-operator/actions/runs/9415095490/job/25935868156 (to test that if job is cancelled, that completed tests are reported as passed & only non-completed tests are cancelled) https://carlcsaposs-canonical.github.io/mysql-router-k8s-operator/82/

carlcsaposs-canonical commented 1 month ago

Opened upstream (allure-pytest) feature request: https://github.com/allure-framework/allure-python/issues/821 to replace our custom pytest plugin