Fix for wrong url of reports (#177)

* Fix for wrong url of reports

* remove the delete hidden file step

* work around for the cleanup of >200k to clean all

* add additional cleanup

* fix clean up

* another fix trail

* restore the number of shards
This commit is contained in:
AYAHASSAN287 2026-04-23 12:57:42 +02:00 committed by GitHub
parent 44dbf628e4
commit be5d3d19f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,7 +37,7 @@ jobs:
strategy:
fail-fast: false
matrix:
shard: [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]
shard: [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]
# total number of shards =18 means tests will split into 18 thread and run in parallel to increase execution speed
# command for sharding :
# pytest --shard-id=<shard_number> --num-shards=<total_shards>
@ -215,12 +215,34 @@ jobs:
path: all-results
merge-multiple: true
- name: Get allure history
if: always()
- name: Check out gh-pages history if it exists
id: checkout_gh_pages
continue-on-error: true
uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages
fetch-depth: 1
- name: Prepare empty gh-pages fallback
if: steps.checkout_gh_pages.outcome != 'success'
run: |
mkdir -p gh-pages/${{ env.CALLER }}/last-history
- name: Remove oversized Allure text attachments
if: always()
run: |
set -euo pipefail
echo "Before cleanup:"
find all-results -type f | wc -l || true
du -sh all-results || true
find all-results -type f -name "*.txt" -delete || true
echo "After cleanup:"
find all-results -type f | wc -l || true
du -sh all-results || true
- name: Setup allure report
uses: simple-elf/allure-report-action@master
@ -230,17 +252,61 @@ jobs:
allure_results: all-results
gh_pages: gh-pages/${{ env.CALLER }}
allure_history: allure-history
keep_reports: 30
keep_reports: 10
report_url: https://logos-messaging.github.io/logos-delivery-interop-tests/${{ env.CALLER }}
- name: Fix permissions (CRITICAL)
if: always()
run: |
echo "Fixing permissions..."
sudo chown -R $USER:$USER allure-history || true
sudo chmod -R u+rwX allure-history || true
- name: Clean allure-history
if: always()
run: |
echo "Cleaning allure-history..."
# Remove ALL txt attachments from history
find allure-history -type f -name "*.txt" -delete || true
echo "After cleanup:"
du -sh allure-history || true
- name: Verify generated report content
if: always()
run: |
set -euo pipefail
test -d allure-history
test -d "allure-history/${{ github.run_number }}"
test -f "allure-history/${{ github.run_number }}/index.html"
test -d "allure-history/last-history"
echo "=== allure-history size ==="
du -sh allure-history || true
echo "=== largest files ==="
find allure-history -type f -printf '%s %p\n' | sort -nr | head -50 || true
echo "=== symlinks ==="
find allure-history -type l -ls || true
echo "=== hard-linked files ==="
find allure-history -type f -links +1 -ls || true
echo "=== top-level tree ==="
find allure-history -maxdepth 2 -type f | sort | head -100 || true
- name: Deploy report to Github Pages
uses: peaceiris/actions-gh-pages@v3
if: always()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: allure-history
publish_dir: ./allure-history
destination_dir: ${{ env.CALLER }}
keep_files: false
enable_jekyll: false
- name: Store output from matrix jobs
run: |