From 0fc136ab113d33e4e1e9bcf071875f87d42c9042 Mon Sep 17 00:00:00 2001 From: fbarbu15 Date: Mon, 16 Oct 2023 16:36:25 +0300 Subject: [PATCH] make reports only for the main job --- .github/workflows/ci.yml | 1 + .github/workflows/test-node.yml | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 12c68b284b..468260d5c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,6 +73,7 @@ jobs: with: nim_wakunode_image: ${{ inputs.nim_wakunode_image || 'wakuorg/nwaku:v0.20.0' }} test_type: node + allure_reports: true node_optional: uses: ./.github/workflows/test-node.yml diff --git a/.github/workflows/test-node.yml b/.github/workflows/test-node.yml index afe856b638..1fcfcc1d68 100644 --- a/.github/workflows/test-node.yml +++ b/.github/workflows/test-node.yml @@ -18,6 +18,10 @@ on: required: false type: string default: '' + allure_reports: + required: false + type: boolean + default: false env: NODE_JS: "18" @@ -30,6 +34,7 @@ jobs: runs-on: ubuntu-latest env: WAKUNODE_IMAGE: ${{ inputs.nim_wakunode_image }} + ALLURE_REPORTS: ${{ inputs.allure_reports }} steps: - uses: actions/checkout@v3 with: @@ -46,7 +51,7 @@ jobs: - run: ${{ (inputs.test_type == 'node-optional') && 'npm run test:optional --workspace=@waku/tests' || 'npm run test:node' }} - name: Get allure history - if: always() + if: always() && env.ALLURE_REPORTS == 'true' uses: actions/checkout@v3 continue-on-error: true with: @@ -54,17 +59,17 @@ jobs: path: gh-pages - name: Setup allure report - if: always() + if: always() && env.ALLURE_REPORTS == 'true' uses: simple-elf/allure-report-action@master id: allure-report with: - allure_results: allure-results + allure_results: packages/tests/allure-results gh_pages: gh-pages/node allure_history: allure-history keep_reports: 10 - name: Deploy report to Github Pages - if: always() + if: always() && env.ALLURE_REPORTS == 'true' uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }}