Skip to content

Commit

Permalink
Merge branch 'main' into mgamis/automate-bug-bash-tests-phase-1
Browse files Browse the repository at this point in the history
  • Loading branch information
mgamis-msft authored Oct 4, 2024
2 parents 79fa775 + 410d3ea commit e790432
Show file tree
Hide file tree
Showing 520 changed files with 11,692 additions and 11,836 deletions.
63 changes: 10 additions & 53 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- release/**
# Presubmit CI on PRs to all branches.
pull_request:
types: [labeled, unlabeled, opened, synchronize, reopened]
# Allows you to run this workflow manually from the Actions tab.
workflow_dispatch:

Expand All @@ -19,24 +20,6 @@ concurrency:
permissions: read-all

jobs:
files_changed:
name: Determine Changes
runs-on: ubuntu-latest
timeout-minutes: 3
# Map a step output to a job output
outputs:
storybook8_changes: ${{ steps.changes.outputs.storybook8 }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE so job can access it
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: changes
with:
# token: ${{ secrets.GITHUB_TOKEN }}
filters: |
storybook8:
- 'packages/storybook8/**'
# get matrix for ci-jobs
get_matrix:
name: Load CI Matrix Details
Expand Down Expand Up @@ -67,7 +50,10 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE so job can access it
- uses: actions/checkout@v4
with:
fetch-depth: 2 # this job requires depth of 2 for access to diff the SHA for change file check
# This job requires to fetch the entire history to access to diff the SHA for change file check.
# Otherwise, it can lead to issues when trying to compare branches, as the fetched commits may not
# include the common ancestor between the branches.
fetch-depth: 0
# Ensure node version is great enough
- name: Use Node.js
uses: actions/setup-node@v4
Expand All @@ -86,10 +72,8 @@ jobs:
if: ${{ always() && steps.install-dependencies.outcome == 'failure' }}
run: echo "Failed to install dependencies, please make sure you run `rush update:all-flavors` if dependencies were updated." && exit 1
- name: Check the necessary change file has been submitted
if: ${{ github.event_name == 'pull_request' && !contains( github.event.pull_request.labels.*.name, 'do not need changelog')}}
run: |
git fetch origin main:main --depth=2
node common/scripts/changelog/check.mjs ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}
if: ${{ github.event_name == 'pull_request' && !contains( github.event.pull_request.labels.*.name, 'does not need changelog')}}
run: node common/scripts/changelog/check.mjs ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}

# Perform lint check
- name: Run linter
Expand Down Expand Up @@ -144,8 +128,6 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE so job can access it
- uses: actions/checkout@v4
with:
fetch-depth: 1
# Ensure node version is great enough
- name: Use Node.js
uses: actions/setup-node@v4
Expand Down Expand Up @@ -239,8 +221,6 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE so job can access it
- uses: actions/checkout@v4
with:
fetch-depth: 1
# Ensure node version is great enough
- name: Use Node.js
uses: actions/setup-node@v4
Expand Down Expand Up @@ -293,8 +273,6 @@ jobs:
matrix: ${{ fromJSON(needs.get_matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -362,8 +340,6 @@ jobs:
matrix: ${{ fromJSON(needs.get_matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -431,8 +407,6 @@ jobs:
matrix: ${{ fromJSON(needs.get_matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -499,8 +473,6 @@ jobs:
matrix: ${{ fromJSON(needs.get_matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -555,8 +527,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -578,16 +548,13 @@ jobs:
working-directory: packages/storybook

build_storybook8:
needs: [get_matrix, files_changed]
if: needs.files_changed.outputs.storybook8_changes == 'true'
needs: get_matrix
name: Build Storybook v8 (${{ matrix.flavor }})
strategy:
matrix: ${{ fromJSON(needs.get_matrix.outputs.matrix) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -604,11 +571,11 @@ jobs:
run: rush install --max-install-attempts 3
- name: Build
if: ${{ matrix.flavor == 'beta' || matrix.flavor == 'beta-release' }}
run: rushx build-s8
run: rushx build
working-directory: packages/storybook8
- name: Tests
if: ${{ matrix.flavor == 'beta' || matrix.flavor == 'beta-release' }}
run: rushx test-s8
run: rushx test
working-directory: packages/storybook8

build_calling_sample:
Expand All @@ -619,8 +586,6 @@ jobs:
matrix: ${{ fromJSON(needs.get_matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -653,8 +618,6 @@ jobs:
matrix: ${{ fromJSON(needs.get_matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -687,8 +650,6 @@ jobs:
matrix: ${{ fromJSON(needs.get_matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -723,8 +684,6 @@ jobs:
matrix: ${{ fromJSON(needs.get_matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -775,8 +734,6 @@ jobs:
matrix: ${{ fromJSON(needs.get_matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ jobs:
# storybook requires the env vars to be in a .env file for access in the manager.ts
run: |
echo TELEMETRY_INSTRUMENTATION_KEY=${{ secrets.TELEMETRY_INSTRUMENTATION_KEY }} > .env
working-directory: ./packages/storybook
working-directory: ./packages/storybook8
env:
GH_TOKEN: ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}

- name: Upload Storybook GH Pages Artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./packages/storybook/storybook-static
path: ./packages/storybook8/storybook-static

- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
Expand Down
63 changes: 1 addition & 62 deletions .github/workflows/publish-chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: 'Publish Chromatic'
on:
pull_request:
paths:
- packages/storybook/**
- packages/storybook8/**
- packages/react-components/**
- packages/react-composites/**
Expand All @@ -19,66 +18,6 @@ concurrency:

jobs:
chromatic_deployment:
name: Publish Chromatic Storybook 6
runs-on: ubuntu-latest
permissions:
packages: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x

- 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 Rush
run: npm install -g @microsoft/rush@$(jq -r '.rushVersion' "rush.json")

- name: Install Dependencies
run: rush install --max-install-attempts 3

- name: Publish Chromatic
id: publish_chromatic
uses: chromaui/action@v1
with:
workingDir: ./packages/storybook
buildScriptName: build:dev
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
allowConsoleErrors: true

- name: Format storybook URL
id: storybook_url
# Get the url from chromatic job then remove the iframe.html at the end of the url (this looks like a bug)
run: |
storybookurl=${{ steps.publish_chromatic.outputs.storybookUrl }}
echo "Storybook URL before: $storybookurl"
newurl=${storybookurl/%iframe.html}
echo "Storybook URL after: $newurl"
echo "url=$newurl" >> $GITHUB_OUTPUT
- name: Add Storybook URL as Issue Comment
if: github.event_name == 'pull_request'
uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Storybook 6 URL ${{ steps.storybook_url.outputs.url }}'
})
chromatic_deployment8:
name: Publish Chromatic Storybook 8
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -111,7 +50,7 @@ jobs:
uses: chromaui/action@v1
with:
workingDir: ./packages/storybook8
buildScriptName: build:dev-s8
buildScriptName: build:dev
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
allowConsoleErrors: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"type": "minor",
"area": "feature",
"workstream": "Ad hoc calling",
"comment": "Stabilize, Inbound calling, PSTN, Teams Adhoc calling",
"area": "fix",
"workstream": "Call Controls",
"comment": "Fix Call Controls to allow proper customization of buttons shown",
"packageName": "@azure/communication-react",
"email": "[email protected]",
"dependentChangeType": "patch"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "prerelease",
"area": "feature",
"workstream": "JavaScript Loaders",
"comment": "Azure Communication services is excited to introduce a new way to consume our Composite experiences. If you are wanting to use the Azure Communication Services UI library Composites and don't develop in react, we are introducing a series of loader functions to allow you to use the Composites in your application. These functions load a react node and attach it to your application allowing you to use the Composites as if you were building in react.",
"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": "AzureCommunicationChatAdapter",
"comment": "Adding logic to flag when the adapter is in the middle of creation",
"packageName": "@azure/communication-react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"type": "patch",
"area": "improvement",
"workstream": "Calling dependency",
"comment": "Upgrade calling beta to 1.28.1-beta.1 and stable to 1.27.2",
"workstream": "Accessibility",
"comment": "Add accessible name to video effects pane",
"packageName": "@azure/communication-react",
"email": "[email protected]",
"dependentChangeType": "patch"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "prerelease",
"area": "feature",
"workstream": "Together Mode",
"comment": "Together mode client state and subscriber implementation",
"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": "Together Mode",
"comment": "Together mode client state and subscriber implementation",
"packageName": "@azure/communication-react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"type": "patch",
"area": "fix",
"workstream": "RTE",
"comment": "Update paddings and theme handling for rich text editor toolbar",
"workstream": "Chat",
"comment": "White spaces handling update for text messages in message components",
"packageName": "@azure/communication-react",
"email": "[email protected]",
"dependentChangeType": "patch"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "prerelease",
"area": "feature",
"workstream": "Together Mode",
"comment": "Together mode client state and subscriber implementation",
"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": "CallSubscriber",
"comment": "Safely subscribe to on stateChanged events to prevent related events from failing if listeners throw an error",
"packageName": "@azure/communication-react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Loading

0 comments on commit e790432

Please sign in to comment.