Skip to content

Commit

Permalink
test: update the workflow to collect all results
Browse files Browse the repository at this point in the history
  • Loading branch information
pcheremu committed Oct 26, 2023
1 parent f0d8ea7 commit bb22dff
Showing 1 changed file with 37 additions and 29 deletions.
66 changes: 37 additions & 29 deletions .github/workflows/app-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -117,7 +153,7 @@ jobs:
- name: Allure Report action from marketplace
uses: simple-elf/[email protected]
if: always()
#id: allure-report
id: allure-report
with:
allure_results: packages/app/allure-results
gh_pages: gh-pages
Expand All @@ -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: |
Expand Down

0 comments on commit bb22dff

Please sign in to comment.