From bb22dff54b99526747446fe6e5668c66105952f0 Mon Sep 17 00:00:00 2001 From: pcheremu Date: Thu, 26 Oct 2023 19:55:20 +0200 Subject: [PATCH] test: update the workflow to collect all results --- .github/workflows/app-e2e.yml | 66 ++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 29 deletions(-) diff --git a/.github/workflows/app-e2e.yml b/.github/workflows/app-e2e.yml index f8f5c62d3..143b56ccf 100644 --- a/.github/workflows/app-e2e.yml +++ b/.github/workflows/app-e2e.yml @@ -105,6 +105,42 @@ jobs: echo "Run in mainnet" E2ENETWORK='${{ inputs.default_network_value_for_e2e }}' npx cucumber-js --tags "${{ matrix.tags }} ${{ inputs.environmentTags }} and not @testnet" fi + + - name: Upload tests to the Allure proj + if: always() && inputs.publish_to_allure == true + env: + ALLURE_TOKEN: ${{ secrets.ALLURE_TOKEN }} + run: | + ./allurectl upload allure-results + + - if: always() + name: Save artifacts + uses: actions/upload-artifact@v3 + with: + name: allure-results + path: packages/app/allure-results/* + + - if: failure() + name: Save artifacts + uses: actions/upload-artifact@v3 + with: + name: portal_e2e_${{ github.run_number }}_artifacts + path: packages/app/tests/e2e/artifacts/* + + publish: + name: Allure Report + runs-on: ubuntu-latest + permissions: + contents: write + needs: e2e + if: always() + steps: + - uses: actions/checkout@v3 + + - uses: actions/download-artifact@v2 + with: + name: allure-results + path: packages/app/allure-results - name: Get Allure history uses: actions/checkout@v3 @@ -117,7 +153,7 @@ jobs: - name: Allure Report action from marketplace uses: simple-elf/allure-report-action@v1.7 if: always() - #id: allure-report + id: allure-report with: allure_results: packages/app/allure-results gh_pages: gh-pages @@ -132,34 +168,6 @@ jobs: PERSONAL_TOKEN: ${{ secrets.GITHUB_TOKEN }} PUBLISH_BRANCH: gh-pages PUBLISH_DIR: allure-history - - - name: Upload tests to the Allure proj - if: always() && inputs.publish_to_allure == true - env: - ALLURE_TOKEN: ${{ secrets.ALLURE_TOKEN }} - run: | - ./allurectl upload allure-results - - - if: failure() - name: Save artifacts - uses: actions/upload-artifact@v3 - with: - name: portal_e2e_${{ github.run_number }}_artifacts - path: packages/app/tests/e2e/artifacts/* - - publish: - name: Allure Report - runs-on: ubuntu-latest - permissions: - contents: write - needs: e2e - if: always() - steps: - - name: Download allurectl - run: wget https://github.com/allure-framework/allurectl/releases/latest/download/allurectl_linux_386 -O ./allurectl - - - name: Change permission for allurectl - run: chmod +x ./allurectl - name: Prepare a link run: |