Skip to content

Commit 0e41233

Browse files
committed
Use separate job for allure to support non-linux builds
Run simple-elf/[email protected] Error: Container action is only supported on Linux
1 parent 8af2196 commit 0e41233

File tree

1 file changed

+50
-26
lines changed

1 file changed

+50
-26
lines changed

.github/workflows/ci.yml

+50-26
Original file line numberDiff line numberDiff line change
@@ -59,42 +59,27 @@ jobs:
5959
- run: poetry install --no-root --all-extras
6060
- run: poe lint
6161
- run: poe build-develop
62+
# TODO: handle matrix build structure with allure
6263
- run: poe test -s --alluredir allure-results -o log_cli_level=DEBUG
64+
- name: "Allure: upload artifact"
65+
uses: actions/upload-artifact@master
66+
if: always()
67+
with:
68+
# TODO: handle matrix build structure with allure
69+
name: allure-results
70+
path: allure-results
71+
retention-days: 30
6372
# Time skipping doesn't yet support ARM
6473
- if: ${{ !endsWith(matrix.os, '-arm') }}
65-
run: poe test -s --alluredir allure-results -o log_cli_level=DEBUG --workflow-environment time-skipping
74+
run: poe test -s -o log_cli_level=DEBUG --workflow-environment time-skipping
6675
# Check cloud if proper target and not on fork
6776
- if: ${{ matrix.cloudTestTarget && (github.event.pull_request.head.repo.full_name == '' || github.event.pull_request.head.repo.full_name == 'temporalio/sdk-python') }}
68-
run: poe test -s --alluredir allure-results -o log_cli_level=DEBUG -k test_cloud_client
77+
run: poe test -s -o log_cli_level=DEBUG -k test_cloud_client
6978
env:
7079
TEMPORAL_CLIENT_CLOUD_API_KEY: ${{ secrets.TEMPORAL_CLIENT_CLOUD_API_KEY }}
7180
TEMPORAL_CLIENT_CLOUD_API_VERSION: 2024-05-13-00
7281
TEMPORAL_CLIENT_CLOUD_NAMESPACE: sdk-ci.a2dd6
7382

74-
# https://allurereport.org/docs/integrations-github/
75-
76-
- name: "Allure: load test report history"
77-
uses: actions/checkout@v4
78-
if: always()
79-
continue-on-error: true
80-
with:
81-
ref: gh-pages
82-
path: allure-data
83-
- name: "Allure: build test report"
84-
uses: simple-elf/[email protected]
85-
if: always()
86-
with:
87-
gh_pages: allure-data
88-
allure_history: allure-history
89-
allure_results: allure-results
90-
- name: "Allure: publish test report"
91-
uses: peaceiris/actions-gh-pages@v4
92-
if: always()
93-
with:
94-
github_token: ${{ secrets.GITHUB_TOKEN }}
95-
publish_branch: gh-pages
96-
publish_dir: allure-history
97-
9883
# Confirm protos are already generated properly with older protobuf
9984
# library and run test with that older version. We must downgrade protobuf
10085
# so we can generate 3.x and 4.x compatible API. We have to use older
@@ -135,3 +120,42 @@ jobs:
135120
version: ${{github.event.pull_request.head.ref}}
136121
version-is-repo-ref: true
137122
features-repo-ref: python-update-updates
123+
124+
# https://allurereport.org/docs/integrations-github/
125+
# https://github.com/simple-elf/allure-report-action/issues/28#issuecomment-1139332329
126+
127+
create-allure-report:
128+
name: "Allure: load previous history, create report, and publish"
129+
needs: build-lint-test
130+
runs-on: ubuntu-latest
131+
steps:
132+
- name: "Allure: Download Artifacts"
133+
uses: actions/download-artifact@v3
134+
id: download
135+
with:
136+
name: allure-results
137+
path: allure-results
138+
139+
- name: "Allure: load test report history"
140+
uses: actions/checkout@v4
141+
if: always()
142+
continue-on-error: true
143+
with:
144+
ref: gh-pages
145+
path: allure-report-data
146+
147+
- name: "Allure: build test report"
148+
uses: simple-elf/[email protected]
149+
if: always()
150+
with:
151+
gh_pages: allure-report-data
152+
allure_results: allure-results
153+
allure_history: allure-history
154+
155+
- name: "Allure: publish test report"
156+
uses: peaceiris/actions-gh-pages@v4
157+
if: always()
158+
with:
159+
github_token: ${{ secrets.GITHUB_TOKEN }}
160+
publish_branch: gh-pages
161+
publish_dir: allure-history

0 commit comments

Comments
 (0)