Skip to content

Commit

Permalink
Use separate job for allure to support non-linux builds
Browse files Browse the repository at this point in the history
Run simple-elf/allure-report-action@v1.9
Error: Container action is only supported on Linux
  • Loading branch information
dandavison committed Aug 20, 2024
1 parent 8af2196 commit 0e41233
Showing 1 changed file with 50 additions and 26 deletions.
76 changes: 50 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,42 +59,27 @@ jobs:
- run: poetry install --no-root --all-extras
- run: poe lint
- run: poe build-develop
# TODO: handle matrix build structure with allure
- run: poe test -s --alluredir allure-results -o log_cli_level=DEBUG
- name: "Allure: upload artifact"
uses: actions/upload-artifact@master
if: always()
with:
# TODO: handle matrix build structure with allure
name: allure-results
path: allure-results
retention-days: 30
# Time skipping doesn't yet support ARM
- if: ${{ !endsWith(matrix.os, '-arm') }}
run: poe test -s --alluredir allure-results -o log_cli_level=DEBUG --workflow-environment time-skipping
run: poe test -s -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 --alluredir allure-results -o log_cli_level=DEBUG -k test_cloud_client
run: poe test -s -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
Expand Down Expand Up @@ -135,3 +120,42 @@ jobs:
version: ${{github.event.pull_request.head.ref}}
version-is-repo-ref: true
features-repo-ref: python-update-updates

# https://allurereport.org/docs/integrations-github/
# https://github.com/simple-elf/allure-report-action/issues/28#issuecomment-1139332329

create-allure-report:
name: "Allure: load previous history, create report, and publish"
needs: build-lint-test
runs-on: ubuntu-latest
steps:
- name: "Allure: Download Artifacts"
uses: actions/download-artifact@v3
id: download
with:
name: allure-results
path: allure-results

- name: "Allure: load test report history"
uses: actions/checkout@v4
if: always()
continue-on-error: true
with:
ref: gh-pages
path: allure-report-data

- name: "Allure: build test report"
uses: simple-elf/allure-report-action@v1.9
if: always()
with:
gh_pages: allure-report-data
allure_results: allure-results
allure_history: allure-history

- 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

0 comments on commit 0e41233

Please sign in to comment.