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

Update Run tests workflow: include TestNG results in allure report #45

Merged
merged 3 commits into from
Apr 15, 2024
Merged
Changes from 1 commit
Commits
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
10 changes: 8 additions & 2 deletions .github/workflows/test-with-allure-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
paths:
- 'aquality-selenium-template/**'
- 'aquality-selenium-template-cucumber/**'
- 'aquality-selenium-template-testng/**'
- 'scripts/**'
push:
branches: [ master ]
Expand All @@ -23,7 +24,8 @@ on:
jobs:
build-and-test:
env:
SUBPROJECT_NAME: aquality-selenium-template-cucumber
CUCUMBER_ALLURE_RESULTS: aquality-selenium-template-cucumber/target/allure-results
TESTNG_ALLURE_RESULTS: aquality-selenium-template-cucumber/target/allure-results
aqualityAutomation marked this conversation as resolved.
Show resolved Hide resolved
ENVIRONMENT: ${{ github.event.inputs.environment == '' && 'stage' || github.event.inputs.environment }}
GH_PAGES_URL: https://aquality-automation.github.io/aquality-selenium-java-template
concurrency: test-${{ github.event.inputs.environment == '' && 'stage' || github.event.inputs.environment }}
Expand All @@ -47,6 +49,10 @@ jobs:
- name: Test with Maven
id: maven_tests
run: mvn test

- name: Copy TestNG allure result to the Cucumber allure result
if: always()
run: cp -r ${{ env.TESTNG_ALLURE_RESULTS }}. ${{ env.CUCUMBER_ALLURE_RESULTS }}

- name: Get Allure history
uses: actions/checkout@v2
Expand All @@ -61,7 +67,7 @@ jobs:
if: always()
id: allure-report
with:
allure_results: ${{ env.SUBPROJECT_NAME }}/target/allure-results
allure_results: ${{ env.CUCUMBER_ALLURE_RESULTS }}
gh_pages: gh-pages
allure_report: allure-report
allure_history: allure-history
Expand Down