make reports only for the main job

This commit is contained in:
fbarbu15 2023-10-16 16:36:25 +03:00
parent 7d1c1b9f02
commit 0fc136ab11
No known key found for this signature in database
GPG Key ID: D75221C8DEA22501
2 changed files with 10 additions and 4 deletions

View File

@ -73,6 +73,7 @@ jobs:
with: with:
nim_wakunode_image: ${{ inputs.nim_wakunode_image || 'wakuorg/nwaku:v0.20.0' }} nim_wakunode_image: ${{ inputs.nim_wakunode_image || 'wakuorg/nwaku:v0.20.0' }}
test_type: node test_type: node
allure_reports: true
node_optional: node_optional:
uses: ./.github/workflows/test-node.yml uses: ./.github/workflows/test-node.yml

View File

@ -18,6 +18,10 @@ on:
required: false required: false
type: string type: string
default: '' default: ''
allure_reports:
required: false
type: boolean
default: false
env: env:
NODE_JS: "18" NODE_JS: "18"
@ -30,6 +34,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
WAKUNODE_IMAGE: ${{ inputs.nim_wakunode_image }} WAKUNODE_IMAGE: ${{ inputs.nim_wakunode_image }}
ALLURE_REPORTS: ${{ inputs.allure_reports }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
@ -46,7 +51,7 @@ jobs:
- run: ${{ (inputs.test_type == 'node-optional') && 'npm run test:optional --workspace=@waku/tests' || 'npm run test:node' }} - run: ${{ (inputs.test_type == 'node-optional') && 'npm run test:optional --workspace=@waku/tests' || 'npm run test:node' }}
- name: Get allure history - name: Get allure history
if: always() if: always() && env.ALLURE_REPORTS == 'true'
uses: actions/checkout@v3 uses: actions/checkout@v3
continue-on-error: true continue-on-error: true
with: with:
@ -54,17 +59,17 @@ jobs:
path: gh-pages path: gh-pages
- name: Setup allure report - name: Setup allure report
if: always() if: always() && env.ALLURE_REPORTS == 'true'
uses: simple-elf/allure-report-action@master uses: simple-elf/allure-report-action@master
id: allure-report id: allure-report
with: with:
allure_results: allure-results allure_results: packages/tests/allure-results
gh_pages: gh-pages/node gh_pages: gh-pages/node
allure_history: allure-history allure_history: allure-history
keep_reports: 10 keep_reports: 10
- name: Deploy report to Github Pages - name: Deploy report to Github Pages
if: always() if: always() && env.ALLURE_REPORTS == 'true'
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}