From ea4a8556027d15004f0fe997e64b3f4a42f9a89d Mon Sep 17 00:00:00 2001 From: Yuri Date: Wed, 8 Nov 2023 18:07:40 +0300 Subject: [PATCH] workflow added --- .github/workflows/runAndReport.yml | 49 ++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/runAndReport.yml diff --git a/.github/workflows/runAndReport.yml b/.github/workflows/runAndReport.yml new file mode 100644 index 0000000..980eddb --- /dev/null +++ b/.github/workflows/runAndReport.yml @@ -0,0 +1,49 @@ +name: Allure Report +run-name: ${{ github.actor }} is creating Allure report 🚀 + +on: + push: + branches-ignore: + - '!main' + +jobs: + autotests: + name: Run tests and generate Allure Report + runs-on: ubuntu-latest + steps: + - name: Clone repository + uses: actions/checkout@v3 + + - name: Set up JDK + uses: actions/setup-java@v3 + with: + java-version: 9 + cache: 'maven' + distribution: 'zulu' + + - name: Run Test + run: ./mvnw verify -e + continue-on-error: true + + - name: Get Allure history + uses: actions/checkout@v3 + if: always() + continue-on-error: true + with: + ref: gh-pages + path: gh-pages + + - name: Allure Report action from marketplace + uses: simple-elf/allure-report-action@v1.7 + if: always() + with: + allure_results: target/allure-results + allure_history: allure-history + + - name: Deploy report to Github Pages + if: always() + uses: peaceiris/actions-gh-pages@v2 + env: + PERSONAL_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PUBLISH_BRANCH: gh-pages + PUBLISH_DIR: allure-history \ No newline at end of file