diff --git a/.github/workflows/ci_pipeline.yaml b/.github/workflows/ci_pipeline.yaml index 2af6de5..f573574 100644 --- a/.github/workflows/ci_pipeline.yaml +++ b/.github/workflows/ci_pipeline.yaml @@ -1,10 +1,12 @@ name: CI workflow on push on: - push: pull_request: branches: - main + push: + branches: + - main schedule: - cron: '0 2 * * *' diff --git a/.github/workflows/dependabot_pr.yaml b/.github/workflows/dependabot_pr.yaml deleted file mode 100644 index 5cc0edc..0000000 --- a/.github/workflows/dependabot_pr.yaml +++ /dev/null @@ -1,14 +0,0 @@ -name: "Dependabot Auto Approve and Merge" - -on: - pull_request: - branches: - - main - -permissions: - pull-requests: write - contents: write - -jobs: - auto-merge: - uses: canonical/sdcore-github-workflows/.github/workflows/dependabot_pr.yaml@v2.3.1 diff --git a/.github/workflows/integration-tests.yaml b/.github/workflows/integration-tests.yaml index 0e7979a..c9162b7 100644 --- a/.github/workflows/integration-tests.yaml +++ b/.github/workflows/integration-tests.yaml @@ -38,7 +38,31 @@ jobs: sudo microk8s kubectl auth can-i create network-attachment-definitions - name: Run integration tests - run: tox -vve integration + run: tox -vve integration -- --alluredir allure-results + + - name: Load test report history + uses: actions/checkout@v3 + if: always() + continue-on-error: true + with: + ref: gh-pages + path: gh-pages + + - name: Build test report + uses: simple-elf/allure-report-action@v1.7 + if: always() + with: + gh_pages: gh-pages + allure_history: allure-history + allure_results: allure-results + + - name: Publish test report + uses: peaceiris/actions-gh-pages@v3 + if: always() + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_branch: gh-pages + publish_dir: allure-history - name: Gather logs if: failure() diff --git a/pyproject.toml b/pyproject.toml index 2d8e077..16e4420 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,6 +4,7 @@ version = "0.1.0" requires-python = ">=3.10" dependencies = [ + "allure-pytest", "codespell", "jinja2", "juju", diff --git a/uv.lock b/uv.lock index 24717c3..0b0513d 100644 --- a/uv.lock +++ b/uv.lock @@ -5,6 +5,32 @@ resolution-markers = [ "python_full_version >= '3.11'", ] +[[package]] +name = "allure-pytest" +version = "2.13.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "allure-python-commons" }, + { name = "pytest" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/2b/c3/829a300b72557e9327fa72692b62917dab3ad5bab678962ea84c066d4eef/allure-pytest-2.13.5.tar.gz", hash = "sha256:0ef8e1790c44a988db6b83c4d4f5e91451e2c4c8ea10601dfa88528d23afcf6e", size = 16976 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/69/7b/430830ed7bf1ef078f9e55eb4b19cc059ef5310a20b5bd73eeb99e2c5ff1/allure_pytest-2.13.5-py3-none-any.whl", hash = "sha256:94130bac32964b78058e62cf4b815ad97a5ac82a065e6dd2d43abac2be7640fc", size = 11606 }, +] + +[[package]] +name = "allure-python-commons" +version = "2.13.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "attrs" }, + { name = "pluggy" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/2d/96/9991a10dcd25b98c8c3e4c7916780f33f13a55a0efbe8c7ea96505271d91/allure-python-commons-2.13.5.tar.gz", hash = "sha256:a232e7955811f988e49a4c1dd6c16cce7e9b81d0ea0422b1e5654d3254e2caf3", size = 12934 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d0/18/79a66d6adc301281803398f7288583dff8d1d3f2672c07ffab03ee12c7cd/allure_python_commons-2.13.5-py3-none-any.whl", hash = "sha256:8b0e837b6e32d810adec563f49e1d04127a5b6770e0232065b7cb09b9953980d", size = 15715 }, +] + [[package]] name = "asttokens" version = "3.0.0" @@ -14,6 +40,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/25/8a/c46dcc25341b5bce5472c718902eb3d38600a903b14fa6aeecef3f21a46f/asttokens-3.0.0-py3-none-any.whl", hash = "sha256:e3078351a059199dd5138cb1c706e6430c05eff2ff136af5eb4790f9d28932e2", size = 26918 }, ] +[[package]] +name = "attrs" +version = "24.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/48/c8/6260f8ccc11f0917360fc0da435c5c9c7504e3db174d5a12a1494887b045/attrs-24.3.0.tar.gz", hash = "sha256:8f5c07333d543103541ba7be0e2ce16eeee8130cb0b3f9238ab904ce1e85baff", size = 805984 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/89/aa/ab0f7891a01eeb2d2e338ae8fecbe57fcebea1a24dbb64d45801bfab481d/attrs-24.3.0-py3-none-any.whl", hash = "sha256:ac96cd038792094f438ad1f6ff80837353805ac950cd2aa0e0625ef19850c308", size = 63397 }, +] + [[package]] name = "backports-strenum" version = "1.3.1" @@ -919,6 +954,7 @@ name = "sdcore-tests" version = "0.1.0" source = { virtual = "." } dependencies = [ + { name = "allure-pytest" }, { name = "codespell" }, { name = "jinja2" }, { name = "juju" }, @@ -930,6 +966,7 @@ dependencies = [ [package.metadata] requires-dist = [ + { name = "allure-pytest" }, { name = "codespell" }, { name = "jinja2" }, { name = "juju" },