Skip to content

Commit

Permalink
updated allure generation
Browse files Browse the repository at this point in the history
  • Loading branch information
AEkaterina committed Oct 9, 2023
1 parent b85ec60 commit 559e814
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 18 deletions.
51 changes: 33 additions & 18 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,35 +52,50 @@ jobs:
# allure --version
# if: runner.os == 'Linux'

- name: Print PATH
run: echo $PATH
# - name: Print PATH
# run: echo $PATH

- name: Verify Allure installation
run: /opt/allure/bin/allure --version
# - name: Verify Allure installation
# run: /opt/allure/bin/allure --version

- name: Check Allure binary presence
run: ls -l /opt/allure/bin
# - name: Check Allure binary presence
# run: ls -l /opt/allure/bin

- name: Run tests
run: mvn clean test -Daquality.buildName="${{github.event.inputs.build_name}}" -DdriverSettings.${{github.event.inputs.platform_name}}.deviceKey=${{github.event.inputs.device_name_and_version}} -Daquality.suiteName="${{github.event.inputs.platform_name}} - ${{github.event.inputs.test_tag}}" -Daquality.environment="${{github.event.inputs.platform_name}}" -Dcredentials.LYRASISReads."ios".${{secrets.BookCardLyrasis1}}=${{secrets.BookPinLyrasis1}} -Dcredentials.LYRASISReads."ios".${{secrets.BookCardLyrasis2}}=${{secrets.BookPinLyrasis2}} -Dcredentials.LYRASISReads."ios".${{secrets.BookCardLyrasis3}}=${{secrets.BookPinLyrasis3}} -Dcredentials.LYRASISReads."ios".${{secrets.BookCardLyrasis4}}=${{secrets.BookPinLyrasis4}} -Dcredentials.LYRASISReads."android".${{secrets.BookCardLyrasis1}}=${{secrets.BookPinLyrasis1}} -Dcredentials.LYRASISReads."android".${{secrets.BookCardLyrasis2}}=${{secrets.BookPinLyrasis2}} -Dcredentials.LYRASISReads."android".${{secrets.BookCardLyrasis3}}=${{secrets.BookPinLyrasis3}} -Dcredentials.LYRASISReads."android".${{secrets.BookCardLyrasis4}}=${{secrets.BookPinLyrasis4}} -Dcredentials.A1QATestLibrary."ios".${{secrets.BookCardLyrasis1}}=${{secrets.BookPinLyrasis1}} -Dcredentials.A1QATestLibrary."ios".${{secrets.BookCardLyrasis2}}=${{secrets.BookPinLyrasis2}} -Dcredentials.A1QATestLibrary."ios".${{secrets.BookCardLyrasis3}}=${{secrets.BookPinLyrasis3}} -Dcredentials.A1QATestLibrary."ios".${{secrets.BookCardLyrasis4}}=${{secrets.BookPinLyrasis4}} -Dcredentials.A1QATestLibrary."android".${{secrets.BookCardLyrasis1}}=${{secrets.BookPinLyrasis1}} -Dcredentials.A1QATestLibrary."android".${{secrets.BookCardLyrasis2}}=${{secrets.BookPinLyrasis2}} -Dcredentials.A1QATestLibrary."android".${{secrets.BookCardLyrasis3}}=${{secrets.BookPinLyrasis3}} -Dcredentials.A1QATestLibrary."android".${{secrets.BookCardLyrasis4}}=${{secrets.BookPinLyrasis4}} -DremoteConnectionUrl=${{secrets.remoteConnectionUrl}} -DdriverSettings.${{github.event.inputs.platform_name}}.capabilities."browserstack.user"=${{secrets.BROWSERSTACK_USER}} -DdriverSettings.${{github.event.inputs.platform_name}}.capabilities."browserstack.key"=${{secrets.BROWSERSTACK_KEY}} -DplatformName=${{github.event.inputs.platform_name}} -DdriverSettings.${{github.event.inputs.platform_name}}.capabilities.app=${{github.event.inputs.bs_app_link}} -Dcucumber.options="--tags '(${{github.event.inputs.test_tag}} and not @ignore) and not @exclude_${{github.event.inputs.platform_name}}'"
continue-on-error: true

- name: Ensure Allure results directory exists
run: mkdir -p allure-results
- name: Generate Allure Report
run: mvn allure:report

- name: Copy Allure results
run: cp -R target/allure-results allure-results/
if: success()

- name: Generate Allure report
run: /opt/allure/bin/allure generate allure-results --clean -o allure-report
working-directory: ${{ github.workspace }}

- name: Upload Allure report artifacts
- name: Upload Allure Report
uses: actions/upload-artifact@v2
with:
name: allure-report
path: allure-report
path: target/site/allure-maven-plugin

- name: Archive and publish Allure Report
uses: actions/github-pages-deploy@v2
with:
token: ${{ secrets.PERSONAL_TOKEN }}
folder: target/site/allure-maven-plugin

# - name: Ensure Allure results directory exists
# run: mkdir -p allure-results

# - name: Copy Allure results
# run: cp -R target/allure-results allure-results/
# if: success()

# - name: Generate Allure report
# run: /opt/allure/bin/allure generate allure-results --clean -o allure-report
# working-directory: ${{ github.workspace }}

# - name: Upload Allure report artifacts
# uses: actions/upload-artifact@v2
# with:
# name: allure-report
# path: allure-report



Expand Down
9 changes: 9 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,19 @@
</configuration>
</plugin>

<!-- <plugin>-->
<!-- <groupId>io.qameta.allure</groupId>-->
<!-- <artifactId>allure-maven</artifactId>-->
<!-- <version>2.10.0</version>-->
<!-- </plugin>-->

<plugin>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-maven</artifactId>
<version>2.10.0</version>
<configuration>
<resultsDirectory>${project.build.directory}/allure-results</resultsDirectory>
</configuration>
</plugin>

<plugin>
Expand Down

0 comments on commit 559e814

Please sign in to comment.