Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Allure reports to GH pages #2393

Open
wants to merge 25 commits into
base: develop
Choose a base branch
from
Open
Changes from 2 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
ff2db30
feat: add central server allure reports
raits Oct 22, 2024
ed200f6
feat: add allure report publishing to Security Server and E2E
raits Oct 22, 2024
b71ed47
Merge branch 'develop' into improve-actions-allure
raits Nov 4, 2024
5d4ca98
chore: address review comments
raits Nov 4, 2024
83123fe
chore: add back missing `uses` for new script job
raits Nov 4, 2024
7057953
chore: correct `uses` location
raits Nov 4, 2024
f07b732
chore: fix markup
raits Nov 4, 2024
118ed98
chore: skip sonar task if SONAR_TOKEN is missing
raits Nov 4, 2024
88594ba
feat: add artifact links to allure reports table
raits Nov 4, 2024
20a5c62
chore: test artifact URL output
raits Nov 5, 2024
019e330
chore: always upload CS artifacts
raits Nov 5, 2024
f1cd06c
chore: remove # from infront of run
raits Nov 5, 2024
e48cd6f
chore: try SS artifacts
raits Nov 6, 2024
2ab5ff4
chore: fix file rights
raits Nov 6, 2024
db5cf2c
chore: test conditional in body
raits Nov 6, 2024
6e337d1
chore: search for `needs` inside the context
raits Nov 7, 2024
1b99be7
chore: log out context
raits Nov 7, 2024
6fee9c6
chore: try to extract needs into const
raits Nov 7, 2024
8559476
chore: possibly incorrect syntax for newer files
raits Nov 7, 2024
dd6546d
Merge branch 'develop' into improve-actions-allure
raits Nov 7, 2024
3ae504f
Merge branch 'develop' into improve-actions-allure
raits Nov 8, 2024
b8dc8a9
chore: fix typo
raits Nov 8, 2024
94dcc3c
feat: add artifacts url check to SS and E2E tests
raits Nov 8, 2024
cd18eed
chore: fix output names for SS and E2E tests
raits Nov 11, 2024
fe9bdf2
feat: add container logs to CS artifacts
raits Nov 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 104 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,41 @@ jobs:
with:
name: CS System Test screenshots
path: src/central-server/admin-service/ui-system-test/build/reports/test-automation/selenide-failures/*.png
- name: Load test report history
uses: actions/checkout@v4
if: always()
continue-on-error: true
with:
ref: allure-gh-pages
path: allure-reports

- name: Build test report
uses: simple-elf/[email protected]
if: always()
with:
gh_pages: allure-reports
subfolder: central-server/ui-system-test
allure_history: allure-history
allure_results: src/central-server/admin-service/ui-system-test/build/allure-results

- name: Publish test report
uses: peaceiris/actions-gh-pages@v4
if: always()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: allure-gh-pages
publish_dir: allure-history
- name: Add link to the report as a comment
uses: actions/github-script@v7
if: always()
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Central Server Allure report: https://nordic-institute.github.io/X-Road/central-server/ui-system-test/${{ github.run_number }}'
})
RunSSSystemTests:
name: Run Security Server system tests
needs: BuildAndPackageWithUnitTests
Expand Down Expand Up @@ -220,6 +255,41 @@ jobs:
src/security-server/system-test/build/ss-container-logs/
src/security-server/system-test/build/ca-container-logs/
src/security-server/system-test/build/reports/test-automation/selenide-failures/*.png
- name: Load test report history
uses: actions/checkout@v4
if: always()
continue-on-error: true
with:
ref: allure-gh-pages
path: allure-reports

- name: Build test report
uses: simple-elf/[email protected]
if: always()
with:
gh_pages: allure-reports
subfolder: security-server/system-test
allure_history: allure-history
allure_results: src/security-server/system-test/build/allure-results

- name: Publish test report
uses: peaceiris/actions-gh-pages@v4
if: always()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: allure-gh-pages
publish_dir: allure-history
- name: Add link to the report as a comment
uses: actions/github-script@v7
if: always()
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Security Server Allure report: https://nordic-institute.github.io/X-Road/security-server/system-test/${{ github.run_number }}'
})
RunE2ETests:
name: Run E2E tests
needs: BuildAndPackageWithUnitTests
Expand Down Expand Up @@ -299,3 +369,37 @@ jobs:
name: E2E report
path: |
src/security-server/e2e-test/build/allure-report/
- name: Load test report history
uses: actions/checkout@v4
if: always()
continue-on-error: true
with:
ref: allure-gh-pages
path: allure-reports

- name: Build test report
uses: simple-elf/[email protected]
if: always()
with:
gh_pages: allure-reports
subfolder: e2e
allure_history: allure-history
allure_results: src/security-server/e2e-test/build/allure-results
- name: Publish test report
uses: peaceiris/actions-gh-pages@v4
if: always()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: allure-gh-pages
publish_dir: allure-history
- name: Add link to the report as a comment
uses: actions/github-script@v7
if: always()
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'E2E Allure report: https://nordic-institute.github.io/X-Road/e2e/${{ github.run_number }}'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps opening in a new tab would be preferred?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on what I found searching the topic it seems that this is not possible in GitHub comments.

})
Loading