diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e3390cd..b5950c76 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,18 +59,42 @@ jobs: - run: poetry install --no-root --all-extras - run: poe lint - run: poe build-develop - - run: poe test -s -o log_cli_level=DEBUG + - run: poe test -s --alluredir allure-results -o log_cli_level=DEBUG # Time skipping doesn't yet support ARM - if: ${{ !endsWith(matrix.os, '-arm') }} - run: poe test -s -o log_cli_level=DEBUG --workflow-environment time-skipping + run: poe test -s --alluredir allure-results -o log_cli_level=DEBUG --workflow-environment time-skipping # Check cloud if proper target and not on fork - if: ${{ matrix.cloudTestTarget && (github.event.pull_request.head.repo.full_name == '' || github.event.pull_request.head.repo.full_name == 'temporalio/sdk-python') }} - run: poe test -s -o log_cli_level=DEBUG -k test_cloud_client + run: poe test -s --alluredir allure-results -o log_cli_level=DEBUG -k test_cloud_client env: TEMPORAL_CLIENT_CLOUD_API_KEY: ${{ secrets.TEMPORAL_CLIENT_CLOUD_API_KEY }} TEMPORAL_CLIENT_CLOUD_API_VERSION: 2024-05-13-00 TEMPORAL_CLIENT_CLOUD_NAMESPACE: sdk-ci.a2dd6 + # https://allurereport.org/docs/integrations-github/ + + - name: "Allure: load test report history" + uses: actions/checkout@v4 + if: always() + continue-on-error: true + with: + ref: gh-pages + path: allure-data + - name: "Allure: build test report" + uses: simple-elf/allure-report-action@v1.9 + if: always() + with: + gh_pages: allure-data + allure_history: allure-history + allure_results: allure-results + - name: "Allure: publish test report" + uses: peaceiris/actions-gh-pages@v4 + if: always() + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_branch: gh-pages + publish_dir: allure-history + # Confirm protos are already generated properly with older protobuf # library and run test with that older version. We must downgrade protobuf # so we can generate 3.x and 4.x compatible API. We have to use older diff --git a/poetry.lock b/poetry.lock index 9d63ea1f..0274b58b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,5 +1,35 @@ # This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +[[package]] +name = "allure-pytest" +version = "2.13.5" +description = "Allure pytest integration" +optional = false +python-versions = "*" +files = [ + {file = "allure-pytest-2.13.5.tar.gz", hash = "sha256:0ef8e1790c44a988db6b83c4d4f5e91451e2c4c8ea10601dfa88528d23afcf6e"}, + {file = "allure_pytest-2.13.5-py3-none-any.whl", hash = "sha256:94130bac32964b78058e62cf4b815ad97a5ac82a065e6dd2d43abac2be7640fc"}, +] + +[package.dependencies] +allure-python-commons = "2.13.5" +pytest = ">=4.5.0" + +[[package]] +name = "allure-python-commons" +version = "2.13.5" +description = "('Contains the API for end users as well as helper functions and classes to build Allure adapters for Python test frameworks',)" +optional = false +python-versions = ">=3.6" +files = [ + {file = "allure-python-commons-2.13.5.tar.gz", hash = "sha256:a232e7955811f988e49a4c1dd6c16cce7e9b81d0ea0422b1e5654d3254e2caf3"}, + {file = "allure_python_commons-2.13.5-py3-none-any.whl", hash = "sha256:8b0e837b6e32d810adec563f49e1d04127a5b6770e0232065b7cb09b9953980d"}, +] + +[package.dependencies] +attrs = ">=16.0.0" +pluggy = ">=0.4.0" + [[package]] name = "appdirs" version = "1.4.4" @@ -1754,4 +1784,4 @@ opentelemetry = ["opentelemetry-api", "opentelemetry-sdk"] [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "0e394859d0cd8522c57955db0e9358eacf18609cd0bd4bb0611403f2de7952c4" +content-hash = "1cf07eeb6b5bc0fcab9b618459b836b6653df8f2e67003e99abe51f1dc05754c" diff --git a/pyproject.toml b/pyproject.toml index a4ad2890..70a42e14 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,6 +41,7 @@ types-protobuf = ">=3.20" typing-extensions = "^4.2.0" [tool.poetry.dev-dependencies] +allure-pytest = "^2.13.5" cibuildwheel = "^2.19.0" grpcio-tools = "^1.48.0" mypy = "^1.0.0"