Skip to content

Commit fc8cc0d

Browse files
Nir.TalNir.Tal
authored andcommitted
feat: merge allure results
1 parent 00aa331 commit fc8cc0d

File tree

2 files changed

+15
-55
lines changed

2 files changed

+15
-55
lines changed

.github/workflows/devRun.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ jobs:
3636
env:
3737
EMAIL: ${{ secrets.EMAIL }}
3838
PASSWORD: ${{ secrets.PASSWORD }}
39-
run: |
40-
source .venv/bin/activate
41-
xvfb-run pytest -m devRun --base-url ${{ vars.BASE_URL }}
39+
run: poetry run xvfb-run pytest -m devRun --base-url ${{ vars.BASE_URL }}
4240
- name: Auto-assign reviewers
4341
uses: kentaro-m/auto-assign-action@v2.0.0
4442
if: success()

.github/workflows/nightly.yml

Lines changed: 14 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Nightly regression tests
1+
name: Nightly Regression Tests
22

33
on:
44
schedule:
@@ -48,75 +48,37 @@ jobs:
4848
with:
4949
virtualenvs-create: true
5050
virtualenvs-in-project: true
51-
virtualenvs-path: .venv
5251
installer-parallel: true
53-
- name: Load cached venv
54-
id: cached-poetry-dependencies
52+
- name: Cache Dependencies
5553
uses: actions/cache@v4
54+
id: poetry-cache
5655
with:
5756
path: .venv
58-
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
57+
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
5958
- name: Install Dependencies
60-
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
59+
if: steps.poetry-cache.outputs.cache-hit != 'true'
6160
run: poetry install --no-interaction --no-root
6261
- name: Run Tests
6362
run: |
64-
source .venv/bin/activate
65-
xvfb-run pytest ${{ github.event.inputs.pytest_command || '-m "not devRun"' }} \
63+
poetry run xvfb-run pytest ${{ github.event.inputs.pytest_command || '-m "not devRun"' }} \
6664
--base-url ${{ vars.BASE_URL }} \
6765
--splits ${{ github.event.inputs.parallelism || 2 }} \
6866
--group ${{ matrix.group }}
69-
- name: Upload test results
67+
- name: Upload Test Results
7068
if: always()
71-
uses: actions/upload-artifact@v4.6.1
69+
uses: actions/upload-artifact@v4
7270
with:
73-
name: test-results-${{ matrix.group }}
74-
path: |
75-
test-results/
76-
allure-results
71+
name: allure-results-${{ matrix.group }}
72+
path: allure-results
7773
retention-days: 7
7874

7975
merge-reports:
8076
needs: nightly-test
8177
if: always()
8278
runs-on: ubuntu-latest
8379
steps:
84-
- uses: actions/checkout@v4
85-
- name: Download all test results
86-
uses: actions/download-artifact@v4
87-
with:
88-
path: artifacts
89-
- name: Merge Allure Results
90-
run: |
91-
mkdir -p allure-results
92-
for dir in artifacts/test-results-*/allure-results; do
93-
cp -r $dir/* allure-results/
94-
done
95-
- name: Link Git Information And Browser Version To Allure Report
96-
working-directory: allure-results
97-
if: always()
98-
run: |
99-
{
100-
echo BUILD_URL=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
101-
echo GIT_BRANCH=${{ github.head_ref || github.ref_name }}
102-
echo GIT_COMMIT_ID=${{ github.sha }}
103-
echo GIT_COMMIT_MESSAGE=$(git show -s --format=%s HEAD)
104-
echo GIT_COMMIT_AUTHOR_NAME=$(git show -s --format='%ae' HEAD)
105-
echo GIT_COMMIT_TIME=$(git show -s --format=%ci HEAD)
106-
echo CHROME_VERSION=$(google-chrome --product-version)
107-
} >> environment.properties
108-
- name: Generate Allure Report
109-
uses: simple-elf/allure-report-action@master
110-
if: always()
111-
id: allure-report
112-
with:
113-
allure_results: allure-results
114-
allure_report: allure-report
115-
gh_pages: gh-pages
116-
allure_history: allure-history
117-
- name: Deploy Report To Github Pages
118-
if: always()
119-
uses: peaceiris/actions-gh-pages@v4
80+
- name: Merge and Publish Allure Report
81+
uses: Valiantsin2021/allure-shard-results-publish@1.0.6
12082
with:
121-
github_token: ${{ secrets.GITHUB_TOKEN }}
122-
publish_dir: allure-history
83+
github-token: ${{ secrets.GITHUB_TOKEN }}
84+
add-env: 'true'

0 commit comments

Comments
 (0)