Skip to content

Commit fbacfd5

Browse files
authored
ci: support multiple allure reports (#497)
1 parent dcd6e86 commit fbacfd5

4 files changed

Lines changed: 35 additions & 56 deletions

File tree

.github/workflows/integration-tests-core.yml

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ on:
4343
required: false
4444
jobs:
4545
run-core-integration-tests:
46+
permissions:
47+
contents: write # Push allure reports to gh-pages
48+
statuses: write # Update status on PR
4649
runs-on: ${{ inputs.os_name }}
4750
steps:
4851
- name: Check out code
@@ -77,7 +80,7 @@ jobs:
7780
ACCOUNT_NAME: ""
7881
CORE_URL: ${{ steps.setup-core.outputs.service_url }}
7982
run: |
80-
pytest -o log_cli=true -o log_cli_level=WARNING tests/integration -k "core" --alluredir=allure-results/
83+
pytest -o log_cli=true -o log_cli_level=WARNING tests/integration -k "core" --alluredir=allure-results/
8184
8285
- name: Run integration tests HTTPS
8386
env:
@@ -90,35 +93,16 @@ jobs:
9093
ACCOUNT_NAME: ""
9194
CORE_URL: ${{ steps.setup-core.outputs.service_https_url }}
9295
run: |
93-
pytest -o log_cli=true -o log_cli_level=WARNING tests/integration -k "core" --alluredir=allure-results-https/
96+
pytest -o log_cli=true -o log_cli_level=WARNING tests/integration -k "core" --alluredir=allure-results-https/
9497
95-
# Need to pull the pages branch in order to fetch the previous runs
96-
- name: Get Allure history
97-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
98-
if: always()
99-
continue-on-error: true
100-
with:
101-
ref: gh-pages
102-
path: gh-pages
103-
104-
- name: Allure Report
105-
uses: firebolt-db/action-allure-report@781b4529b67b4f393c63d7dc1e098cb558e1ab16 # v1.4.1
106-
if: always()
107-
continue-on-error: true
108-
with:
109-
github-key: ${{ secrets.GITHUB_TOKEN }}
110-
test-type: core
111-
allure-dir: allure-results
112-
pages-branch: gh-pages
113-
repository-name: python-sdk
114-
115-
- name: Allure Report HTTPS
116-
uses: firebolt-db/action-allure-report@781b4529b67b4f393c63d7dc1e098cb558e1ab16 # v1.4.1
98+
- name: Allure Reports
99+
uses: firebolt-db/action-allure-report@8cdc116f65f6eca845a992e347e72b75ca8ccf5f # v2.1.1
117100
if: always()
118-
continue-on-error: true
119101
with:
120-
github-key: ${{ secrets.GITHUB_TOKEN }}
121-
test-type: core_https
122-
allure-dir: allure-results-https
102+
github-token: ${{ github.token }}
123103
pages-branch: gh-pages
124-
repository-name: python-sdk
104+
mapping-json: |
105+
{
106+
"allure-results": "core",
107+
"allure-results-https": "core_https"
108+
}

.github/workflows/integration-tests-v1.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
required: true
1414
jobs:
1515
tests:
16+
permissions:
17+
contents: write # Push allure reports to gh-pages
18+
statuses: write # Update status on PR
1619
runs-on: ubuntu-latest
1720
steps:
1821
- name: Check out code

.github/workflows/integration-tests-v2.yml

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ on:
2020

2121
jobs:
2222
tests:
23+
permissions:
24+
contents: write # Push allure reports to gh-pages
25+
statuses: write # Update status on PR
2326
runs-on: ubuntu-latest
2427
steps:
2528
- name: Check out code
@@ -58,23 +61,15 @@ jobs:
5861
ACCOUNT_NAME: ${{ vars.FIREBOLT_ACCOUNT }}
5962
LONG_TEST_VALUE: ${{ vars.LONG_TEST_VALUE_V2 }}
6063
run: |
61-
pytest -n 6 --dist loadgroup --timeout_method "signal" -o log_cli=true -o log_cli_level=WARNING tests/integration -k "not V1 and not core" --runslow --alluredir=allure-results
62-
63-
# Need to pull the pages branch in order to fetch the previous runs
64-
- name: Get Allure history
65-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
66-
if: always()
67-
continue-on-error: true
68-
with:
69-
ref: gh-pages
70-
path: gh-pages
64+
pytest -n 6 --dist loadgroup --timeout_method "signal" -o log_cli=true -o log_cli_level=WARNING tests/integration -k "not V1 and not core" --runslow --alluredir=allure-results
7165
7266
- name: Allure Report
73-
uses: firebolt-db/action-allure-report@781b4529b67b4f393c63d7dc1e098cb558e1ab16 # v1.4.1
67+
uses: firebolt-db/action-allure-report@8cdc116f65f6eca845a992e347e72b75ca8ccf5f # v2.1.1
7468
if: always()
7569
with:
76-
github-key: ${{ inputs.token || secrets.GITHUB_TOKEN }}
77-
test-type: integration
78-
allure-dir: allure-results
70+
github-token: ${{ inputs.token || secrets.GITHUB_TOKEN }}
7971
pages-branch: gh-pages
80-
repository-name: python-sdk
72+
mapping-json: |
73+
{
74+
"allure-results": "integration_v2"
75+
}

.github/workflows/unit-tests.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ jobs:
2020
unit-tests:
2121
runs-on: ubuntu-latest
2222
permissions:
23-
contents: write
23+
contents: write # Push allure reports to gh-pages
24+
statuses: write # Update status on PR
2425
steps:
2526
- name: Check out code
2627
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -41,20 +42,16 @@ jobs:
4142
run: |
4243
pytest --cov=src/ tests/unit --cov-report=xml --alluredir=allure-results
4344
44-
- name: Get Allure history
45-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
46-
if: always()
47-
continue-on-error: true
48-
with:
49-
ref: gh-pages
50-
path: gh-pages
51-
5245
- name: Allure Report
53-
uses: firebolt-db/action-allure-report@781b4529b67b4f393c63d7dc1e098cb558e1ab16 # v1.4.1
46+
uses: firebolt-db/action-allure-report@8cdc116f65f6eca845a992e347e72b75ca8ccf5f # v2.1.1
5447
if: always()
55-
continue-on-error: true
5648
with:
57-
github-key: ${{ secrets.GITHUB_TOKEN }}
49+
github-token: ${{ github.token }}
50+
pages-branch: gh-pages
51+
mapping-json: |
52+
{
53+
"allure-results": "unit"
54+
}
5855
5956
- name: Upload coverage report
6057
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0

0 commit comments

Comments
 (0)