From cefe2d722d36ab518dea41a4763ebddc97b6a95e Mon Sep 17 00:00:00 2001 From: Emlyn Bolton <3941071+emlynmac@users.noreply.github.com> Date: Tue, 16 Jan 2024 14:43:12 -0800 Subject: [PATCH] Improve CI workflow (#4016) --- .github/workflows/breaking-change-check.yml | 16 +- .github/workflows/ci.yml | 325 ++++++++---------- ...-4381efa8-31c2-4742-9a45-526f826a2811.json | 9 + ...-4381efa8-31c2-4742-9a45-526f826a2811.json | 9 + common/config/workflows/matrix.json | 6 +- 5 files changed, 176 insertions(+), 189 deletions(-) create mode 100644 change-beta/@azure-communication-react-4381efa8-31c2-4742-9a45-526f826a2811.json create mode 100644 change/@azure-communication-react-4381efa8-31c2-4742-9a45-526f826a2811.json diff --git a/.github/workflows/breaking-change-check.yml b/.github/workflows/breaking-change-check.yml index b2b89847a9a..8e9d24ee35a 100644 --- a/.github/workflows/breaking-change-check.yml +++ b/.github/workflows/breaking-change-check.yml @@ -18,41 +18,41 @@ concurrency: jobs: # get matrix for ci-jobs get_matrix: - name: Set CI flavors + name: Load CI Matrix Details runs-on: ubuntu-latest outputs: matrix: ${{ steps.get-matrix.outputs.matrix }} steps: # Checks-out your repository under $GITHUB_WORKSPACE so job can access it - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 # Ensure node version is great enough - name: Use Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version: 'lts/*' - id: get-matrix run: echo "matrix=$(node ./common/scripts/workflow-read-matrix.mjs)" >> $GITHUB_OUTPUT check_breaking_changes: needs: get_matrix - name: Check Breaking Changes + name: 'Check Breaking Changes (${{ matrix.flavor }})' runs-on: ubuntu-latest strategy: matrix: ${{ fromJSON(needs.get_matrix.outputs.matrix) }} steps: # Checks-out your repository under $GITHUB_WORKSPACE so job can access it - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'breaking-change') }} with: fetch-depth: 0 # Ensure node version is great enough - name: Use Node.js if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'breaking-change') }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version: 'lts/*' # Try get node_modules from cache - name: Restore node_modules from cache if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'breaking-change') }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b73511f74f..a46b5c95522 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,39 +17,40 @@ concurrency: jobs: # get matrix for ci-jobs get_matrix: - name: Set CI flavors + name: Load CI Matrix Details runs-on: ubuntu-latest outputs: matrix: ${{ steps.get-matrix.outputs.matrix }} steps: # Checks-out your repository under $GITHUB_WORKSPACE so job can access it - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: - fetch-depth: 0 + sparse-checkout: | + common # Ensure node version is great enough - name: Use Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version: 'lts/*' - id: get-matrix run: echo "matrix=$(node ./common/scripts/workflow-read-matrix.mjs)" >> $GITHUB_OUTPUT build_packages: needs: get_matrix - name: Build Packages + name: 'Build Packages (${{ matrix.flavor }})' runs-on: ubuntu-latest strategy: matrix: ${{ fromJSON(needs.get_matrix.outputs.matrix) }} steps: # Checks-out your repository under $GITHUB_WORKSPACE so job can access it - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 # Ensure node version is great enough - name: Use Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version: 'lts/*' # Try get node_modules from cache - name: Restore node_modules from cache uses: actions/cache@v3 @@ -58,7 +59,7 @@ jobs: key: ${{ runner.os }}-${{ hashFiles('common/config/rush/pnpm-lock.yaml') }} # Install dependencies - name: Install rush - run: npm install -g @microsoft/rush@5.112.2 + run: npm install -g @microsoft/rush - name: Install dependencies run: rush install --max-install-attempts 3 # Switch flavor if necessary @@ -114,7 +115,43 @@ jobs: # Ensure all downstream packlet versions are consitent with the base packlet version - name: Ensure all package versions are consistent run: rush ensure-consistent-versions - # Tests + # Upload azure-communication api.md files for easy access + - name: Upload communication-react api files + uses: actions/upload-artifact@v3 + with: + name: communication-react.${{ matrix.flavor }}.api.json + path: | + packages/communication-react/temp/communication-react.api.json + + jest-test-coverage: + needs: [get_matrix, build_packages] + name: 'Jest Test Coverage (${{ matrix.flavor }})' + runs-on: ubuntu-latest + strategy: + matrix: ${{ fromJSON(needs.get_matrix.outputs.matrix) }} + steps: + # Checks-out your repository under $GITHUB_WORKSPACE so job can access it + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + # Ensure node version is great enough + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + # Try get node_modules from cache + - name: Restore node_modules from cache + uses: actions/cache@v3 + with: + path: common/temp/pnpm-store + key: ${{ runner.os }}-${{ hashFiles('common/config/rush/pnpm-lock.yaml') }} + # Install dependencies + - name: Install rush + run: npm install -g @microsoft/rush + - name: Install dependencies + run: rush install --max-install-attempts 3 + - name: Build Packages + run: rush build -t @azure/communication-react - name: Test Packages run: rush test:ci-coverage -t @azure/communication-react env: @@ -123,33 +160,66 @@ jobs: run: npx nyc merge temp/jest/coverage/detailed-report/ temp/jest/current/merge/detailed-full/coverage-report.json - name: Create a summary report from the detailed report run: npx nyc report --temp-dir temp/jest/current/merge/detailed-full/ --report-dir temp/jest/current/merge/summary/ --reporter json-summary - # Upload coverage reports which will be consumed later - - name: Upload detailed and summary jest coverage reports - uses: actions/upload-artifact@v3 + + # Pull requests show details of coverage changes + - name: Get jest tests coverage of main from gist + if: ${{ github.event_name == 'pull_request' }} + run: curl -o temp/jest/base/coverage-report.json "https://gist.github.com/communication-ui-bot/${{ matrix.coverage_gist_id }}/raw/communication-react-jest-report-${{ matrix.flavor }}.json" --create-dirs -L + - name: Calculate coverage change + id: coverage + run: | + node ./common/config/workflows/coverage-utils.js ../../../temp/jest/base/coverage-report.json ../../../temp/jest/current/merge/summary/coverage-summary.json lines + node ./common/config/workflows/coverage-utils.js ../../../temp/jest/base/coverage-report.json ../../../temp/jest/current/merge/summary/coverage-summary.json statements + node ./common/config/workflows/coverage-utils.js ../../../temp/jest/base/coverage-report.json ../../../temp/jest/current/merge/summary/coverage-summary.json functions + node ./common/config/workflows/coverage-utils.js ../../../temp/jest/base/coverage-report.json ../../../temp/jest/current/merge/summary/coverage-summary.json branches + - name: Find Comment + if: ${{ github.event_name == 'pull_request' }} + uses: peter-evans/find-comment@v2 + id: fc with: - name: jest-coverage-report-${{ matrix.flavor }} - path: temp/jest/current/merge/ - # Upload azure-communication api.md files for easy access - - name: Upload communication-react api files - uses: actions/upload-artifact@v3 + issue-number: ${{ github.event.pull_request.number }} + comment-author: 'github-actions[bot]' + body-includes: '## @azure/communication-react jest test coverage for ***${{ matrix.flavor }}' + - name: Create or update comment + if: ${{ github.event_name == 'pull_request' }} + uses: peter-evans/create-or-update-comment@v2 with: - name: communication-react.${{ matrix.flavor }}.api.json - path: | - packages/communication-react/temp/communication-react.api.json + comment-id: ${{ steps.fc.outputs.comment-id }} + issue-number: ${{ github.event.pull_request.number }} + body: | + ## @azure/communication-react jest test coverage for ***${{ matrix.flavor }}***. + + | | Lines | Statements | Functions | Branches | + | --- | :-------: | :-------: | :-------: | :-------: | + | Base |${{ steps.coverage.outputs.base_lines }}|${{ steps.coverage.outputs.base_statements }}|${{ steps.coverage.outputs.base_functions }}|${{ steps.coverage.outputs.base_branches }}| + | Current |${{ steps.coverage.outputs.current_lines }}|${{ steps.coverage.outputs.current_statements }}|${{ steps.coverage.outputs.current_functions }}|${{ steps.coverage.outputs.current_branches }}| + | Diff |${{ steps.coverage.outputs.lines_diff }}|${{ steps.coverage.outputs.statements_diff }}|${{ steps.coverage.outputs.functions_diff }}|${{ steps.coverage.outputs.branches_diff }}| + edit-mode: replace + + # Main branch gets coverage report uploaded + - name: Upload bundle report to gist + if: github.ref == 'refs/heads/main' + uses: exuanbo/actions-deploy-gist@v1 + with: + token: ${{ secrets.MACHINE_ACCOUNT_PAT }} + gist_id: ${{ matrix.coverage_gist_id }} + gist_description: 'Jest report for tracking tests coverage for ${{ matrix.flavor }}' + gist_file_name: communication-react-jest-report-${{ matrix.flavor }}.json + file_path: temp/jest/current/merge/summary/coverage-summary.json in-progress-feature-validation: name: Check if in progress feature can be removed separately runs-on: ubuntu-latest steps: # Checks-out your repository under $GITHUB_WORKSPACE so job can access it - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 # Ensure node version is great enough - name: Use Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version: 'lts/*' # Try get node_modules from cache - name: Restore node_modules from cache uses: actions/cache@v3 @@ -158,7 +228,7 @@ jobs: key: ${{ runner.os }}-${{ hashFiles('common/config/rush/pnpm-lock.yaml') }} # Install dependencies - name: Install rush - run: npm install -g @microsoft/rush@5.112.2 + run: npm install -g @microsoft/rush - name: Install dependencies run: rush install --max-install-attempts 3 # Switch flavor if necessary @@ -172,12 +242,12 @@ jobs: # Builds - name: Build Packages run: rush build -t @azure/communication-react - # Type check test folder - # - must be run after building all packlets because it depends on compiled packlet dependencies - # - must be run only on beta flavor build because the browser test code is not conditional compiled - - name: Type check test folder - if: ${{ matrix.flavor == 'beta' }} - run: cd packages/react-composites && rushx tsc:e2e + # # Type check test folder + # # - must be run after building all packlets because it depends on compiled packlet dependencies + # # - must be run only on beta flavor build because the browser test code is not conditional compiled + # - name: Type check test folder + # if: ${{ matrix.flavor == 'beta' }} + # run: cd packages/react-composites && rushx tsc:e2e # Tests - name: Test Packages run: rush test -t @azure/communication-react @@ -191,25 +261,25 @@ jobs: call_composite_automation_test: needs: get_matrix - name: Call Composite automation test + name: 'Call Composite automation test (${{ matrix.flavor }})' runs-on: ubuntu-latest strategy: matrix: ${{ fromJSON(needs.get_matrix.outputs.matrix) }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Use Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version: 'lts/*' - name: Restore node_modules from cache uses: actions/cache@v3 with: path: common/temp/pnpm-store key: ${{ runner.os }}-${{ hashFiles('common/config/rush/pnpm-lock.yaml') }} - name: Install rush - run: npm install -g @microsoft/rush@5.112.2 + run: npm install -g @microsoft/rush - name: Install dependencies run: rush install --max-install-attempts 3 - uses: browser-actions/setup-chrome@v1 @@ -269,25 +339,25 @@ jobs: chat_composite_automation_test: needs: get_matrix - name: Chat Composite automation test + name: 'Chat Composite automation test (${{ matrix.flavor }})' runs-on: ubuntu-latest strategy: matrix: ${{ fromJSON(needs.get_matrix.outputs.matrix) }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Use Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version: 'lts/*' - name: Restore node_modules from cache uses: actions/cache@v3 with: path: common/temp/pnpm-store key: ${{ runner.os }}-${{ hashFiles('common/config/rush/pnpm-lock.yaml') }} - name: Install rush - run: npm install -g @microsoft/rush@5.112.2 + run: npm install -g @microsoft/rush - name: Install dependencies run: rush install --max-install-attempts 3 - uses: browser-actions/setup-chrome@v1 @@ -347,25 +417,25 @@ jobs: call_with_chat_composite_automation_test: needs: get_matrix - name: Call With Chat Composite automation test + name: 'Call With Chat Composite automation test (${{ matrix.flavor }})' runs-on: ubuntu-latest strategy: matrix: ${{ fromJSON(needs.get_matrix.outputs.matrix) }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Use Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version: 'lts/*' - name: Restore node_modules from cache uses: actions/cache@v3 with: path: common/temp/pnpm-store key: ${{ runner.os }}-${{ hashFiles('common/config/rush/pnpm-lock.yaml') }} - name: Install rush - run: npm install -g @microsoft/rush@5.112.2 + run: npm install -g @microsoft/rush - name: Install dependencies run: rush install --max-install-attempts 3 - uses: browser-actions/setup-chrome@v1 @@ -427,20 +497,20 @@ jobs: name: Build Storybook runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Use Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version: 'lts/*' - name: Restore node_modules from cache uses: actions/cache@v3 with: path: common/temp/pnpm-store key: ${{ runner.os }}-${{ hashFiles('common/config/rush/pnpm-lock.yaml') }} - name: Install rush - run: npm install -g @microsoft/rush@5.112.2 + run: npm install -g @microsoft/rush - name: Install dependencies run: rush install --max-install-attempts 3 - name: Build @@ -451,25 +521,25 @@ jobs: build_calling_sample: needs: get_matrix - name: Build Calling Sample + name: 'Build Calling Sample (${{ matrix.flavor }})' runs-on: ubuntu-latest strategy: matrix: ${{ fromJSON(needs.get_matrix.outputs.matrix) }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Use Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version: 'lts/*' - name: Restore node_modules from cache uses: actions/cache@v3 with: path: common/temp/pnpm-store key: ${{ runner.os }}-${{ hashFiles('common/config/rush/pnpm-lock.yaml') }} - name: Install rush - run: npm install -g @microsoft/rush@5.112.2 + run: npm install -g @microsoft/rush - name: Install dependencies run: rush install --max-install-attempts 3 # Switch flavor if necessary @@ -497,25 +567,25 @@ jobs: build_chat_sample: needs: get_matrix - name: Build Chat Sample + name: 'Build Chat Sample (${{ matrix.flavor }})' runs-on: ubuntu-latest strategy: matrix: ${{ fromJSON(needs.get_matrix.outputs.matrix) }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Use Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version: 'lts/*' - name: Restore node_modules from cache uses: actions/cache@v3 with: path: common/temp/pnpm-store key: ${{ runner.os }}-${{ hashFiles('common/config/rush/pnpm-lock.yaml') }} - name: Install rush - run: npm install -g @microsoft/rush@5.112.2 + run: npm install -g @microsoft/rush - name: Install dependencies run: rush install --max-install-attempts 3 # Switch flavor if necessary @@ -543,25 +613,25 @@ jobs: build_call_with_chat_sample: needs: get_matrix - name: Build CallWithChat Sample + name: 'Build CallWithChat Sample (${{ matrix.flavor }})' runs-on: ubuntu-latest strategy: matrix: ${{ fromJSON(needs.get_matrix.outputs.matrix) }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Use Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version: 'lts/*' - name: Restore node_modules from cache uses: actions/cache@v3 with: path: common/temp/pnpm-store key: ${{ runner.os }}-${{ hashFiles('common/config/rush/pnpm-lock.yaml') }} - name: Install rush - run: npm install -g @microsoft/rush@5.112.2 + run: npm install -g @microsoft/rush - name: Install dependencies run: rush install --max-install-attempts 3 # Switch flavor if necessary @@ -589,20 +659,20 @@ jobs: build_static_html_composites_sample: needs: get_matrix - name: Build And Test Static HTML Composites Sample + name: 'Build And Test Static HTML Composites Sample (${{ matrix.flavor }})' runs-on: ubuntu-latest strategy: matrix: ${{ fromJSON(needs.get_matrix.outputs.matrix) }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Use Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version: 'lts/*' - name: Install rush - run: npm install -g @microsoft/rush@5.112.2 + run: npm install -g @microsoft/rush - name: Install dependencies run: rush install --max-install-attempts 3 - uses: browser-actions/setup-chrome@v1 @@ -651,20 +721,20 @@ jobs: build_component_examples: needs: get_matrix - name: Build And Test Component+Binding Examples + name: 'Build And Test Component+Binding Examples (${{ matrix.flavor }})' runs-on: ubuntu-latest strategy: matrix: ${{ fromJSON(needs.get_matrix.outputs.matrix) }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Use Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version: 'lts/*' - name: Install rush - run: npm install -g @microsoft/rush@5.112.2 + run: npm install -g @microsoft/rush - name: Install dependencies run: rush install --max-install-attempts 3 - uses: browser-actions/setup-chrome@v1 @@ -711,105 +781,6 @@ jobs: body: 'Failed to pass the component examples UI Test. If this PR is for UI change and the error is snapshot mismatch, please add "update_snapshots" label to the PR for updating the snapshot.' }) - compare_jest_tests_coverage: - runs-on: ubuntu-latest - if: ${{ github.event_name == 'pull_request' }} - name: Compare unit tests coverage from pr head ref to base ref (${{ matrix.flavor }}) - needs: build_packages - strategy: - matrix: - include: - - flavor: stable - gist_id: d1528e50153e6f7ea569040d7b437abb - - flavor: beta - gist_id: 67224b1799c92f0e1cd2da24798e4dd5 - steps: - # Checks-out your repository under $GITHUB_WORKSPACE so job can access it - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - # Ensure node version is great enough - - name: Use Node.js - uses: actions/setup-node@v3 - with: - node-version: '20.x' - # Try get node_modules from cache - - name: Restore node_modules from cache - uses: actions/cache@v3 - with: - path: common/temp/pnpm-store - key: ${{ runner.os }}-${{ hashFiles('common/config/rush/pnpm-lock.yaml') }} - # Install dependencies in order to use script - - name: Install rush - run: npm install -g @microsoft/rush@5.112.2 - - name: Install dependencies - run: rush install --max-install-attempts 3 - - name: Get jest tests coverage of main from gist - run: curl -o temp/jest/base/coverage-report.json "https://gist.github.com/communication-ui-bot/${{ matrix.gist_id }}/raw/communication-react-jest-report-${{ matrix.flavor }}.json" --create-dirs -L - - name: Download coverage report from the build_packages job - uses: actions/download-artifact@v3 - with: - name: jest-coverage-report-${{ matrix.flavor }} - path: temp/jest/current/merge/ - - name: Calculate coverage change - id: coverage - run: | - node ./common/config/workflows/coverage-utils.js ../../../temp/jest/base/coverage-report.json ../../../temp/jest/current/merge/summary/coverage-summary.json lines - - node ./common/config/workflows/coverage-utils.js ../../../temp/jest/base/coverage-report.json ../../../temp/jest/current/merge/summary/coverage-summary.json statements - - node ./common/config/workflows/coverage-utils.js ../../../temp/jest/base/coverage-report.json ../../../temp/jest/current/merge/summary/coverage-summary.json functions - - node ./common/config/workflows/coverage-utils.js ../../../temp/jest/base/coverage-report.json ../../../temp/jest/current/merge/summary/coverage-summary.json branches - - name: Find Comment - uses: peter-evans/find-comment@v2 - id: fc - with: - issue-number: ${{ github.event.pull_request.number }} - comment-author: 'github-actions[bot]' - body-includes: '## @azure/communication-react jest test coverage for ***${{ matrix.flavor }}' - - name: Create or update comment - uses: peter-evans/create-or-update-comment@v2 - with: - comment-id: ${{ steps.fc.outputs.comment-id }} - issue-number: ${{ github.event.pull_request.number }} - body: | - ## @azure/communication-react jest test coverage for ***${{ matrix.flavor }}***. - - | | Lines | Statements | Functions | Branches | - | --- | :-------: | :-------: | :-------: | :-------: | - | Base |${{ steps.coverage.outputs.base_lines }}|${{ steps.coverage.outputs.base_statements }}|${{ steps.coverage.outputs.base_functions }}|${{ steps.coverage.outputs.base_branches }}| - | Current |${{ steps.coverage.outputs.current_lines }}|${{ steps.coverage.outputs.current_statements }}|${{ steps.coverage.outputs.current_functions }}|${{ steps.coverage.outputs.current_branches }}| - | Diff |${{ steps.coverage.outputs.lines_diff }}|${{ steps.coverage.outputs.statements_diff }}|${{ steps.coverage.outputs.functions_diff }}|${{ steps.coverage.outputs.branches_diff }}| - edit-mode: replace - - update_jest_coverage_report: - runs-on: ubuntu-latest - name: Upload jest coverage report to gist (${{ matrix.flavor }}) - needs: build_packages - if: github.ref == 'refs/heads/main' - strategy: - matrix: - include: - - flavor: stable - gist_id: d1528e50153e6f7ea569040d7b437abb - - flavor: beta - gist_id: 67224b1799c92f0e1cd2da24798e4dd5 - steps: - - name: Download coverage report from the build_packages job - uses: actions/download-artifact@v3 - with: - name: jest-coverage-report-${{ matrix.flavor }} - path: temp/jest/current/merge/ - - name: Upload bundle report to gist - uses: exuanbo/actions-deploy-gist@v1 - with: - token: ${{ secrets.MACHINE_ACCOUNT_PAT }} - gist_id: ${{ matrix.gist_id }} - gist_description: 'Jest report for tracking tests coverage for ${{ matrix.flavor }}' - gist_file_name: communication-react-jest-report-${{ matrix.flavor }}.json - file_path: temp/jest/current/merge/summary/coverage-summary.json - compare_base_bundle_stats: runs-on: ubuntu-latest if: ${{ github.event_name == 'pull_request' }} @@ -833,10 +804,6 @@ jobs: with: path: current name: ${{ matrix.app }}-report - - name: Use Node.js - uses: actions/setup-node@v3 - with: - node-version: '20.x' - name: Calculate size change id: bundles run: | diff --git a/change-beta/@azure-communication-react-4381efa8-31c2-4742-9a45-526f826a2811.json b/change-beta/@azure-communication-react-4381efa8-31c2-4742-9a45-526f826a2811.json new file mode 100644 index 00000000000..2004d84b8e7 --- /dev/null +++ b/change-beta/@azure-communication-react-4381efa8-31c2-4742-9a45-526f826a2811.json @@ -0,0 +1,9 @@ +{ + "type": "none", + "area": "improvement", + "workstream": "CI Workflow", + "comment": "Break out jest coverage to separate job", + "packageName": "@azure/communication-react", + "email": "3941071+emlynmac@users.noreply.github.com", + "dependentChangeType": "none" +} diff --git a/change/@azure-communication-react-4381efa8-31c2-4742-9a45-526f826a2811.json b/change/@azure-communication-react-4381efa8-31c2-4742-9a45-526f826a2811.json new file mode 100644 index 00000000000..2004d84b8e7 --- /dev/null +++ b/change/@azure-communication-react-4381efa8-31c2-4742-9a45-526f826a2811.json @@ -0,0 +1,9 @@ +{ + "type": "none", + "area": "improvement", + "workstream": "CI Workflow", + "comment": "Break out jest coverage to separate job", + "packageName": "@azure/communication-react", + "email": "3941071+emlynmac@users.noreply.github.com", + "dependentChangeType": "none" +} diff --git a/common/config/workflows/matrix.json b/common/config/workflows/matrix.json index 7756490acbb..809d6cc146f 100644 --- a/common/config/workflows/matrix.json +++ b/common/config/workflows/matrix.json @@ -1,10 +1,12 @@ { "include": [ { - "flavor": "stable" + "flavor": "stable", + "coverage_gist_id": "d1528e50153e6f7ea569040d7b437abb" }, { - "flavor": "beta" + "flavor": "beta", + "coverage_gist_id": "67224b1799c92f0e1cd2da24798e4dd5" } ]