Skip to content

Commit

Permalink
Merge pull request #11635 from OfficeDev/dev
Browse files Browse the repository at this point in the history
build: preview release 20240517
  • Loading branch information
MSFT-yiz committed May 17, 2024
2 parents 5b9352e + 3518702 commit 2ee4f4a
Show file tree
Hide file tree
Showing 1,383 changed files with 7,148 additions and 24,972 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@
/packages/vscode-extension/test/localdebug @kimizhu @swatDong @kuojianlu @a1exwang @qinezh @XiaofuHuang @xiaolang124 @dooriya
/packages/vscode-extension/test/migration @kimizhu @swatDong @kuojianlu @a1exwang @qinezh @XiaofuHuang @xiaolang124 @dooriya

/schemas/* @yuqizhou77 @huimiu

/templates/* @hund030 @eriolchan @huimiu
/templates/**/ai-assistant-bot @kimizhu @swatDong @kuojianlu
/templates/**/ai-bot @kimizhu @swatDong @kuojianlu
Expand Down
3 changes: 1 addition & 2 deletions .github/scripts/fxcore-sync-up-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@ function syncTemplateVersion(templateVersion, templateConfigs) {

function updateUseLocalFlag(templateVersion, templateConfigs) {
if (!semver.prerelease(templateVersion) || templateVersion.includes("rc")) {
`================== configure useLocalFlag: false ==================`
templateConfigs.useLocalTemplate = false;
} else {
`================== configure useLocalFlag: true ==================`
templateConfigs.useLocalTemplate = true;
}
console.log(`================== configure useLocalFlag: ${templateConfigs.useLocalTemplate} ==================`)
}
7 changes: 4 additions & 3 deletions .github/workflows/rerun.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ jobs:
- name: clean devtunnel
run: |
curl -sL https://aka.ms/DevTunnelCliInstall | bash
~/bin/devtunnel user login --sp-tenant-id ${{env.DEVTUNNEL_TENANT_ID}} --sp-client-id ${{env.DEVTUNNEL_CLIENT_ID}} --sp-secret ${{env.DEVTUNNEL_CLIENT_SECRET}}
~/bin/devtunnel delete-all -f
wget https://tunnelsassetsprod.blob.core.windows.net/cli/1.0.1249+67b1cd300c/linux-x64-devtunnel -O ./devtunnel
chmod 777 ./devtunnel
./devtunnel user login --sp-tenant-id ${{env.DEVTUNNEL_TENANT_ID}} --sp-client-id ${{env.DEVTUNNEL_CLIENT_ID}} --sp-secret ${{env.DEVTUNNEL_CLIENT_SECRET}}
./devtunnel delete-all -f
- name: re-run failed jobs
run: |
Expand Down
163 changes: 105 additions & 58 deletions .github/workflows/ui-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ permissions:
jobs:
setup:
runs-on: ubuntu-latest
environment: engineering
permissions:
id-token: write
contents: read
env:
AUTO_TEST_PLAN_ID: ${{ github.event.inputs.source-testplan-id }}
Expand All @@ -75,12 +73,6 @@ jobs:
- name: Init GitHub CLI
run: |
echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token
- uses: azure/login@v1
with:
client-id: ${{secrets.DEVOPS_CLIENT_ID}}
tenant-id: ${{secrets.DEVOPS_TENANT_ID}}
subscription-id: ${{secrets.DEVOPS_SUB_ID}}
- name: bvt (dispatch)
id: bvt
Expand Down Expand Up @@ -161,28 +153,12 @@ jobs:
path: |
./${{ steps.ttk.outputs.package }}
- name: Archive Test Plan
if: ${{ github.event.inputs.target-testplan-name != '' }}
working-directory: ./packages/tests
run: |
pnpm install
testplanid=`npx ts-node src/scripts/testPlan.ts obtain vscode ${{ github.event.inputs.target-testplan-name }}`
echo "Testplan id is $testplanid"
npx ts-node src/scripts/testPlan.ts archive $testplanid
- name: Upload testplan to artifact
if: ${{ github.event.inputs.target-testplan-name != '' }}
uses: actions/upload-artifact@v3
with:
name: testplan
path: |
./packages/tests/testplan.json
- name: clean devtunnel
run: |
curl -sL https://aka.ms/DevTunnelCliInstall | bash
~/bin/devtunnel user login --sp-tenant-id ${{env.DEVTUNNEL_TENANT_ID}} --sp-client-id ${{env.DEVTUNNEL_CLIENT_ID}} --sp-secret ${{env.DEVTUNNEL_CLIENT_SECRET}}
~/bin/devtunnel delete-all -f
wget https://tunnelsassetsprod.blob.core.windows.net/cli/1.0.1249+67b1cd300c/linux-x64-devtunnel -O ./devtunnel
chmod 777 ./devtunnel
./devtunnel user login --sp-tenant-id ${{env.DEVTUNNEL_TENANT_ID}} --sp-client-id ${{env.DEVTUNNEL_CLIENT_ID}} --sp-secret ${{env.DEVTUNNEL_CLIENT_SECRET}}
./devtunnel delete-all -f
outputs:
npm-tag: ${{ steps.bvt.outputs.npm-tag || steps.pvt.outputs.npm-tag }}
Expand All @@ -198,9 +174,7 @@ jobs:
main:
name: ${{ matrix.test-case }}|${{ matrix.os }}|node ${{ matrix.node-version }}|${{ github.ref_name }}
needs: setup
environment: engineering
permissions:
id-token: write
contents: read
timeout-minutes: 50
env:
Expand Down Expand Up @@ -238,12 +212,6 @@ jobs:
matrix: ${{ fromJson(needs.setup.outputs.matrix) }}
runs-on: ${{ matrix.os }}
steps:
- uses: azure/login@v1
with:
client-id: ${{secrets.DEVOPS_CLIENT_ID}}
tenant-id: ${{secrets.DEVOPS_TENANT_ID}}
subscription-id: ${{secrets.DEVOPS_SUB_ID}}

- name: Set m365 account (unix)
if: matrix.os != 'windows-latest'
run: |
Expand Down Expand Up @@ -277,6 +245,11 @@ jobs:
with:
dotnet-version: 6.0.x

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install function core tool (ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
Expand All @@ -287,16 +260,31 @@ jobs:
sudo apt-get install azure-functions-core-tools-4
- name: Install devtunnel (ubuntu)
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
if: matrix.os == 'ubuntu-latest'
run: |
wget https://tunnelsassetsprod.blob.core.windows.net/cli/1.0.1249+67b1cd300c/linux-x64-devtunnel -O ./devtunnel
chmod +x ./devtunnel
mkdir -p ~/bin
mv ./devtunnel ~/bin/devtunnel
PATH=~/bin:$PATH
~/bin/devtunnel user login --sp-tenant-id ${{env.DEVTUNNEL_TENANT_ID}} --sp-client-id ${{env.DEVTUNNEL_CLIENT_ID}} --sp-secret ${{env.DEVTUNNEL_CLIENT_SECRET}}
- name: Install devtunnel (mac)
if: matrix.os == 'macos-latest'
run: |
curl -sL https://aka.ms/DevTunnelCliInstall | bash
curl https://tunnelsassetsprod.blob.core.windows.net/cli/1.0.1249+67b1cd300c/osx-x64-devtunnel-zip -o ./devtunnel.zip
unzip ./devtunnel.zip
chmod +x ./devtunnel
mkdir -p ~/bin
mv ./devtunnel ~/bin/devtunnel
PATH=~/bin:$PATH
~/bin/devtunnel user login --sp-tenant-id ${{env.DEVTUNNEL_TENANT_ID}} --sp-client-id ${{env.DEVTUNNEL_CLIENT_ID}} --sp-secret ${{env.DEVTUNNEL_CLIENT_SECRET}}
- name: Install devtunnel (windows)
if: matrix.os == 'windows-latest'
working-directory: packages/tests
run: |
powershell Invoke-WebRequest -Uri https://aka.ms/TunnelsCliDownload/win-x64 -OutFile devtunnel.exe
powershell Invoke-WebRequest -Uri https://tunnelsassetsprod.blob.core.windows.net/cli/1.0.1249+67b1cd300c/devtunnel.exe -OutFile devtunnel.exe
$currentDirectory = (Get-Location).Path
$executablePath = Join-Path $currentDirectory "devtunnel.exe"
[System.Environment]::SetEnvironmentVariable("Path", "$currentPath;$executablePath", [System.EnvironmentVariableTarget]::Machine)
Expand Down Expand Up @@ -400,33 +388,57 @@ jobs:
ref: main
path: ./packages/tests/resource

- name: Get VSCode & chromedriver
- name: Get VSCode
working-directory: packages/tests
run: |
npx extest get-vscode --storage .test-resources --type stable --code_version 1.88.1
npx extest get-chromedriver --storage .test-resources --type stable --code_version 1.88.1
cd .test-resources
npx extest get-vscode --storage .test-resources --type insider --code_version 1.90.0-insider
- name: Get chromedriver (linux)
if: matrix.os == 'ubuntu-latest'
working-directory: packages/tests/.test-resources
run: |
curl -sLO https://storage.googleapis.com/chrome-for-testing-public/122.0.6261.128/linux64/chromedriver-linux64.zip
ls
- name: Get chromedriver (mac)
if: matrix.os == 'macos-latest'
working-directory: packages/tests/.test-resources
run: |
if [[ $(uname -m) == "x86_64" ]]; then
curl -sLO https://storage.googleapis.com/chrome-for-testing-public/122.0.6261.128/mac-x64/chromedriver-mac-x64.zip
elif [[ $(uname -m) == "arm64" ]]; then
curl -sLO https://storage.googleapis.com/chrome-for-testing-public/122.0.6261.128/mac-arm64/chromedriver-mac-arm64.zip
fi
ls
- name: Get chromedriver (windows)
if: matrix.os == 'windows-latest'
working-directory: packages/tests/.test-resources
run: |
powershell Invoke-WebRequest -Uri https://storage.googleapis.com/chrome-for-testing-public/122.0.6261.128/win64/chromedriver-win64.zip -OutFile chromedriver-win64.zip
ls
- name: Extract VSCode & chromedriver(unix)
if: matrix.os == 'ubuntu-latest'
working-directory: packages/tests
run: |
7z x ".test-resources/chromedriver-linux64.zip" -o".test-resources" -y
tar xzvf ".test-resources/stable.tar.gz" --directory ".test-resources"
- name: Extract VSCode & chromedriver(mac)
if: matrix.os == 'macos-latest'
working-directory: packages/tests
run: |
7z x ".test-resources/chromedriver-mac-x64.zip" -o".test-resources" -y
if [[ $(uname -m) == "x86_64" ]]; then
7z x ".test-resources/chromedriver-mac-x64.zip" -o".test-resources" -y
elif [[ $(uname -m) == "arm64" ]]; then
7z x ".test-resources/chromedriver-mac-arm64.zip" -o".test-resources" -y
fi
- name: Extract VSCode & chromedriver(win)
if: matrix.os == 'windows-latest'
working-directory: packages/tests
run: |
7z x ".test-resources/chromedriver-win64.zip" -o".test-resources" -y
7z x ".test-resources/stable.zip" -o".test-resources/VSCode-win32-x64-archive" -y
- name: M365 Login
working-directory: packages/tests
Expand All @@ -438,30 +450,35 @@ jobs:
run: |
npm run build
- name: Install python extension
working-directory: packages/tests
run: |
npx extest install-from-marketplace --storage .test-resources --extensions_dir .test-resources --type insider ms-python.python
- name: Install docker extension
if: contains(matrix.test-case, 'docker')
working-directory: packages/tests
run: |
npx extest install-from-marketplace --storage .test-resources --extensions_dir .test-resources --type stable ms-azuretools.vscode-docker
npx extest install-from-marketplace --storage .test-resources --extensions_dir .test-resources --type insider ms-azuretools.vscode-docker
- name: Install vsix(unix)
if: matrix.os != 'windows-latest'
working-directory: packages/tests
run: |
vsix=`find . -type f -name "*.vsix" | sed 's|.*/\(.*\)|\1|'`
npx extest install-vsix --storage .test-resources --extensions_dir .test-resources --type stable --vsix_file $vsix
npx extest install-vsix --storage .test-resources --extensions_dir .test-resources --type insider --vsix_file $vsix
- name: Install vsix(win)
if: matrix.os == 'windows-latest'
working-directory: packages/tests
run: |
$vsix = (Get-ChildItem *.vsix | Select-Object -ExpandProperty Name)
npx extest install-vsix --storage .test-resources --extensions_dir .test-resources --type stable --vsix_file $vsix
npx extest install-vsix --storage .test-resources --extensions_dir .test-resources --type insider --vsix_file $vsix
- name: proposal api support
run: |
mkdir -p $HOME/.vscode
echo '{"enable-proposed-api": ["TeamsDevApp.ms-teams-vscode-extension"]}' > $HOME/.vscode/argv.json
mkdir -p $HOME/.vscode-insiders
echo '{"enable-proposed-api": ["TeamsDevApp.ms-teams-vscode-extension"]}' > $HOME/.vscode-insiders/argv.json
- name: Run UI Test(ubuntu)
if: matrix.os == 'ubuntu-latest'
Expand All @@ -470,13 +487,13 @@ jobs:
sudo apt-get install xvfb
export DISPLAY=:99.0
Xvfb -ac :99 -screen 0 1920x1080x16 &
npx extest run-tests --storage .test-resources --extensions_dir .test-resources --type stable --code_version 1.88.1 --code_settings ./settings.json ./out/ui-test/**/${{ matrix.test-case }}.test.js
npx extest run-tests --storage .test-resources --extensions_dir .test-resources --type insider --code_version 1.90.0-insider --code_settings ./settings.json ./out/ui-test/**/${{ matrix.test-case }}.test.js
- name: Run UI Test(mac & win)
if: matrix.os != 'ubuntu-latest'
working-directory: packages/tests
run: |
npx extest run-tests --storage .test-resources --extensions_dir .test-resources --type stable --code_version 1.88.1 --code_settings ./settings.json ./out/ui-test/**/${{ matrix.test-case }}.test.js
npx extest run-tests --storage .test-resources --extensions_dir .test-resources --type insider --code_version 1.90.0-insider --code_settings ./settings.json ./out/ui-test/**/${{ matrix.test-case }}.test.js
- name: Upload test result json file
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -509,18 +526,48 @@ jobs:
path: |
~/.fx/telemetryTest.log
test-plan-update:
needs: main
if: ${{ github.event.inputs.target-testplan-name != '' }}
environment: engineering
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2
with:
version: 8
- name: setup project
run: |
pnpm --filter=@microsoft/teamsfx-test install
- uses: azure/login@v1
with:
client-id: ${{secrets.DEVOPS_CLIENT_ID}}
tenant-id: ${{secrets.DEVOPS_TENANT_ID}}
subscription-id: ${{secrets.DEVOPS_SUB_ID}}
enable-AzPSSession: true

- name: Archive Test Plan
working-directory: packages/tests
run: |
testplanid=`npx ts-node src/scripts/testPlan.ts obtain vscode ${{ github.event.inputs.target-testplan-name }}`
echo "Testplan id is $testplanid"
npx ts-node src/scripts/testPlan.ts archive $testplanid
- name: Download TestPlan
if: ${{ always() && github.event.inputs.target-testplan-name != '' }}
uses: actions/download-artifact@v3
with:
name: testplan
path: ./packages/tests
path: ./packages/tests/mocha-results

- name: Sync to Azure DevOps Test Plan
if: ${{ always() && github.event.inputs.target-testplan-name != '' }}
working-directory: packages/tests
run: |
npx ts-node src/scripts/testPlan.ts report ./testplan.json ./mochawesome-report/mochawesome.json
npx ts-node src/scripts/testPlan.ts report ./testplan.json ./mocha-results
rerun:
permissions:
Expand Down
24 changes: 16 additions & 8 deletions .github/workflows/vscode-marketplace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ jobs:
publish-to-vscode-marketplace:
runs-on: ubuntu-latest
environment: production
permissions:
id-token: write
actions: read
contents: write

steps:
- name: Setup node
Expand All @@ -44,7 +48,7 @@ jobs:
github_token: ${{ secrets.CD_PAT }}
workflow: cd.yml
path: .

- name: get VSC beta tag
if: ${{ github.event.inputs.isPreview != 'no' }}
id: vsc_ver
Expand All @@ -55,19 +59,23 @@ jobs:
- uses: mathieudutour/github-tag-action@v6.0
if: ${{ github.event.inputs.isPreview != 'no' }}
with:
with:
github_token: ${{ secrets.CD_PAT }}
custom_tag: ${{ steps.vsc_ver.outputs.vsc_ver }}
tag_prefix: ""

- name: Azure login
uses: azure/login@v1
with:
client-id: ${{ secrets.PUBLISHER_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.PUBLISHER_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.PUBLISHER_AZURE_SUBSCRIPTION_ID }}
enable-AzPSSession: true

- name: release preview
if: ${{ github.event.inputs.isPreview != 'no' }}
env:
PAT: ${{ secrets.VSCE_PAT }}
run: vsce publish --pre-release --pat $PAT --packagePath *.vsix --noVerify
run: vsce publish --pre-release --azure-credential --packagePath *.vsix --noVerify

- name: release to VSCode marketplace
if: ${{ github.event.inputs.isPreview == 'no' }}
run: vsce publish --pat $PAT --packagePath *.vsix --noVerify
env:
PAT: ${{ secrets.VSCE_PAT }}
run: vsce publish --azure-credential --packagePath *.vsix --noVerify

0 comments on commit 2ee4f4a

Please sign in to comment.