Skip to content

Commit

Permalink
Merge branch 'main' into cnwankwo/CallFeatureStream
Browse files Browse the repository at this point in the history
  • Loading branch information
cn0151 authored Oct 29, 2024
2 parents 92f7122 + 36c8f34 commit 984e927
Show file tree
Hide file tree
Showing 121 changed files with 1,296 additions and 527 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[ci.yml](./ci.yml) contains the [GitHub workflow](https://docs.github.com/en/get-started/getting-started-with-git/git-workflows) definition for presubmit tests in this repository.

All Pull Requests in this repository must pass the checks in this workflow before being merged into the `main` branch. The checks are distributed across several jobs. Each job runs on a seprate build agent. Most of them can run concurrently.
All Pull Requests in this repository must pass the checks in this workflow before being merged into the `main` branch. The checks are distributed across several jobs. Each job runs on a separate build agent. Most of them can run concurrently.

Many of checks build and test the library code in both the [`beta` and `stable` build flavors](../../docs/references/beta-only-features.md). For such jobs, we use a [job matrix](https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs) to run an instance of the job for each build flavor. The following high-level description of the checks calls out which checks are build-flavor aware.

Expand Down Expand Up @@ -38,6 +38,6 @@ Many of checks build and test the library code in both the [`beta` and `stable`

- Informational jobs to track jest tests coverage (`compare_jest_tests_coverage`, `update_jest_coverage_report`): These jobs track the jest tests coverage (lines, functions, statements, branches) for `@azure/communication-react` built in the previous steps. Any differences in the coverage are reported as Pull Request comments, _but do not block Pull Request from being merged_. This jobs are build flavor aware.

- Informational jobs to track sample bundle size (`compare_base_bundle_stats`, `update_base_bundle_report`): These jobs track the expected bundle size of the sample applications built in the previous steps. Any differences in the size are reported as Pull Request comments, _but do not block Pull Request from being merged_. This job is not build flavor aware.
- Informational jobs to track sample bundle size (`compare_base_bundle_stats`, `update_base_bundle_report`): These jobs track the expected bundle size of the sample applications built in the previous steps. Any differences in the size are reported as Pull Request comments. If the differences are above a threshold, it will block the Pull Request from being merged. Pull Request owners can add a `significant bundle size change` tag to unblock the merge. This job is not build flavor aware.

- `check_failure`: This is a meta-job that only applies to _post-submit_ workflow run (which re-uses the same `ci.yml` definition). It opens a new GitHub issue in the repository if any fundamental step in the jobs above fails on post-submit workflow run, because it indicates a problem with the CI infrastructure or a bug in the product on `main`. This job is not build flavor aware.
102 changes: 78 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
run: rush lint
# Builds
- name: Build Packages
run: rush build -t @azure/communication-react
run: rush build -v -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
Expand All @@ -95,7 +95,7 @@ jobs:
then
echo "Success, no new api changes found."
else
echo "API CHANGES FOUND in ${{ matrix.flavor }} flavor - PLEASE RUN \"${{ matrix.flavor == 'stable' && 'rush switch-flavor:stable &&' || '' }} rush build -t @azure/communication-react\""
echo "API CHANGES FOUND in ${{ matrix.flavor }} flavor - PLEASE RUN \"${{ matrix.flavor == 'stable' && 'rush switch-flavor:stable &&' || '' }} rush build -v -t @azure/communication-react\""
echo "Changes:"
git status ${{ matrix.flavor != 'stable' && '**/review/beta/**' || '**/review/stable/**' }}.md -s
exit 1
Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:
run: node ./common/scripts/install-dependencies-ci.mjs ${{ matrix.flavor }}
# Build and test
- name: Build Packages
run: rush build -t @azure/communication-react
run: rush build -v -t @azure/communication-react
- name: Test Packages
run: rush test:ci-coverage -t @azure/communication-react
env:
Expand Down Expand Up @@ -246,7 +246,7 @@ jobs:
# Builds
- name: Build Packages
if: ${{ matrix.flavor == 'beta-release'}}
run: rush build -t @azure/communication-react
run: rush build -v -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
Expand Down Expand Up @@ -298,7 +298,7 @@ jobs:
- name: Install packlets used by browser tests
run: |
cd packages/react-composites
rush build -t .
rush build -v -t .
- name: Call Composite Visual Regression Tests
id: visualregressiontests
run: |
Expand Down Expand Up @@ -365,7 +365,7 @@ jobs:
- name: Install packlets used by browser tests
run: |
cd packages/react-composites
rush build -t .
rush build -v -t .
- name: Chat Composite Visual Regression Tests
id: visualregressiontests
run: |
Expand Down Expand Up @@ -432,7 +432,7 @@ jobs:
- name: Install packlets used by browser tests
run: |
cd packages/react-composites
rush build -t .
rush build -v -t .
- name: CallWithChatComposite Visual Regression Tests
id: visualregressiontests
run: |
Expand Down Expand Up @@ -495,7 +495,7 @@ jobs:
# This is needed because react-components depends on acs-ui-common and
# acs-ui-common specifies main/module variables in package.json
- name: Build Common Package
run: rush build -t acs-ui-common
run: rush build -v -t acs-ui-common
- name: Components Visual Regression Tests
id: visualregressiontests
run: |
Expand Down Expand Up @@ -573,7 +573,7 @@ jobs:
- name: Install Dependencies
run: node ./common/scripts/install-dependencies-ci.mjs ${{ matrix.flavor }}
- name: Build dependencies
run: rush build -t @azure/communication-react
run: rush build -v -t @azure/communication-react
- name: Build
run: rush build:minify -o calling
- name: Tests
Expand Down Expand Up @@ -605,7 +605,7 @@ jobs:
- name: Install Dependencies
run: node ./common/scripts/install-dependencies-ci.mjs ${{ matrix.flavor }}
- name: Build dependencies
run: rush build -t @azure/communication-react
run: rush build -v -t @azure/communication-react
- name: Build
run: rush build:minify -o chat
- name: Tests
Expand Down Expand Up @@ -637,7 +637,7 @@ jobs:
- name: Install Dependencies
run: node ./common/scripts/install-dependencies-ci.mjs ${{ matrix.flavor }}
- name: Build dependencies
run: rush build -t @azure/communication-react
run: rush build -v -t @azure/communication-react
- name: Build
run: rush build:minify -o callwithchat
- name: Tests
Expand All @@ -649,6 +649,32 @@ jobs:
name: CallWithChat-report
path: samples/CallWithChat/dist/build/report.json

build_calling_stateful_samples:
needs: get_matrix
name: 'Build Calling Stateful Samples (${{ matrix.flavor }})'
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJSON(needs.get_matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Restore node_modules from cache
uses: actions/cache@v4
with:
path: common/temp/pnpm-store
key: ${{ runner.os }}-${{ hashFiles('common/config/rush/pnpm-lock.yaml') }}
- name: Install Dependencies
run: node ./common/scripts/install-dependencies-ci.mjs ${{ matrix.flavor }}
- name: Build dependencies
run: rush build -t @azure/communication-react
- name: Build
run: rush build -o calling-stateful-samples
- name: Tests
run: rush test -o calling-stateful-samples

build_static_html_composites_sample:
needs: get_matrix
name: 'Build And Test Static HTML Composites Sample (${{ matrix.flavor }})'
Expand All @@ -670,7 +696,7 @@ jobs:
with:
chrome-version: 120.0.6099
- name: Build
run: rush build -t sample-static-html-composites
run: rush build -v -t sample-static-html-composites
- name: Visual Regression Tests
id: visualregressiontests
run: |
Expand Down Expand Up @@ -720,7 +746,7 @@ jobs:
with:
chrome-version: 120.0.6099
- name: Build
run: rush build -t component-examples
run: rush build -v -t component-examples
- name: Visual Regression Tests
id: visualregressiontests
run: |
Expand Down Expand Up @@ -791,18 +817,46 @@ jobs:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: '## ${{ matrix.app }} bundle size is'
- name: Create or update comment
uses: peter-evans/create-or-update-comment@v2
- name: Checkout repository
uses: actions/checkout@v4
- name: Delete existing comment
uses: actions/github-script@v4
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
## ${{ matrix.app }} bundle size is ***${{ steps.bundles.outputs.change }}***.
- Current size: ${{ steps.bundles.outputs.current_size }}
- Base size: ${{ steps.bundles.outputs.base_size}}
- Diff size: ${{ steps.bundles.outputs.diff}}
edit-mode: replace

github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const commentId = '${{ steps.fc.outputs.comment-id }}'
if (commentId) {
await github.issues.deleteComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: commentId
})
}
- name: Post new comment
uses: actions/github-script@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
await github.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: `## ${{ matrix.app }} bundle size is ***${{ steps.bundles.outputs.change }}***.
- Current size: ${{ steps.bundles.outputs.current_size }}
- Base size: ${{ steps.bundles.outputs.base_size }}
- Diff size: ${{ steps.bundles.outputs.diff }}`
});
- name: Check whether the bundle size is increased significantly
if: ${{ github.event_name == 'pull_request' && !contains( github.event.pull_request.labels.*.name, 'significant bundle size change') }}
run: |
significantBundleSizeThreshold=800
app="${{ matrix.app }}"
bundleSizeDiff="${{ steps.bundles.outputs.diff }}"
if [ "$bundleSizeDiff" -ge "$significantBundleSizeThreshold" ]; then
echo "The bundle size diff for $app is greater than the threshold of $significantBundleSizeThreshold kb! If the bundle size increase is intended, please add \`significant bundle size change\` label to the PR." >&2
exit 1
fi
echo "Bundle size diff for $app is below the threshold of $significantBundleSizeThreshold. All is good!"
update_base_bundle_report:
runs-on: ubuntu-latest
name: Upload bundle size report to gist - ${{ matrix.app }}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "patch",
"area": "fix",
"workstream": "A11y",
"comment": "Remove unnecessary disabled prop from label",
"packageName": "@azure/communication-react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "prerelease",
"area": "feature",
"workstream": "",
"comment": "Update the reconnecting RemoteUFD according to figma",
"packageName": "@azure/communication-react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "prerelease",
"area": "feature",
"workstream": "RTT",
"comment": "RTT Modal Component",
"packageName": "@azure/communication-react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "minor",
"area": "improvement",
"workstream": "Dependency Update",
"comment": "Updated Chat SDK and Signaling to Latest Stable Release",
"packageName": "@azure/communication-react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "prerelease",
"area": "fix",
"workstream": "A11y",
"comment": "Add Close aria label for spotlight prompt",
"packageName": "@azure/communication-react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "prerelease",
"area": "fix",
"workstream": "a11y",
"comment": "Add Close aria label for spotlight prompt",
"packageName": "@azure/communication-react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "prerelease",
"area": "feature",
"workstream": "RTT",
"comment": "RTT component for single line of RTT",
"packageName": "@azure/communication-react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "prerelease",
"area": "feature",
"workstream": "RTT",
"comment": "RTT Disclosure Banner",
"packageName": "@azure/communication-react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "patch",
"area": "fix",
"workstream": "A11y",
"comment": "Remove unnecessary disabled prop from label",
"packageName": "@azure/communication-react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "minor",
"area": "improvement",
"workstream": "Dependency Update",
"comment": "Updated Chat SDK and Signaling to Latest Stable Release",
"packageName": "@azure/communication-react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
4 changes: 3 additions & 1 deletion common/config/babel/features.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ module.exports = {
// Feature for showing dtmp dialer by default
"dtmf-dialer-on-by-default",
// Feature for together mode
"together-mode"
"together-mode",
// Feature for RTT
"rtt"
],
beta: [
"call-readiness",
Expand Down
Loading

0 comments on commit 984e927

Please sign in to comment.