Skip to content

Commit

Permalink
Merge branch 'main' into serverlesssample
Browse files Browse the repository at this point in the history
  • Loading branch information
zackliu authored Aug 29, 2024
2 parents ff0a9c3 + 4ff91d0 commit 6b59b8f
Show file tree
Hide file tree
Showing 188 changed files with 43,129 additions and 13,124 deletions.
67 changes: 0 additions & 67 deletions .github/workflows/build-tunnel.yml

This file was deleted.

11 changes: 11 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,18 @@ name: Build
on:
push:
branches: [ "main" ]
paths:
- 'sdk/**'
- 'tools/**'
- 'samples/**'
- 'experimental/**'
pull_request:
branches: [ "main" ]
paths:
- 'sdk/**'
- 'tools/**'
- 'samples/**'
- 'experimental/**'

jobs:
build:
Expand Down Expand Up @@ -36,6 +46,7 @@ jobs:
- run: |
cd tools/awps-tunnel/client
yarn install
yarn run build
yarn test
- run: yarn workspaces run test
- name: Setup .NET ${{ matrix.dotnet-version }}
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/integration-tests-csharp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Integration tests for C#

on:
workflow_dispatch:
inputs:
web_pubsub_connection_string:
description: 'Azure Web PubSub Connection String'
required: true
type: string
push:
branches: [ "main" ]
paths:
- 'tests/integration-tests/csharp/**'
pull_request:
branches: [ "main" ]
paths:
- 'tests/integration-tests/csharp/**'

jobs:
test:
runs-on: ubuntu-latest
env:
WEB_PUBSUB_CONNECTION_STRING: ${{ github.event.inputs.web_pubsub_connection_string || secrets.WEB_PUBSUB_CONNECTION_STRING }}
strategy:
matrix:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
dotnet-version: [6.x]
steps:
- uses: actions/checkout@v4
- name: Test csharp tests
run: dotnet test tests/integration-tests/csharp/csharp.csproj

42 changes: 42 additions & 0 deletions .github/workflows/integration-tests-java.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Integration tests for Java

on:
workflow_dispatch:
inputs:
web_pubsub_connection_string:
description: 'Azure Web PubSub Connection String'
required: true
type: string
push:
branches: [ "main" ]
paths:
- 'tests/integration-tests/java/**'
pull_request:
branches: [ "main" ]
paths:
- 'tests/integration-tests/java/**'

jobs:
test:
runs-on: ubuntu-latest
env:
WEB_PUBSUB_CONNECTION_STRING: ${{ github.event.inputs.web_pubsub_connection_string || secrets.WEB_PUBSUB_CONNECTION_STRING }}
strategy:
matrix:
java-version: [17]
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
cache: maven

- name: Build and test with Maven
run: |
cd tests/integration-tests/java/integration-tests
mvn -B verify --file pom.xml
42 changes: 42 additions & 0 deletions .github/workflows/integration-tests-js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Integration tests for JavaScript

on:
workflow_dispatch:
inputs:
web_pubsub_connection_string:
description: 'Azure Web PubSub Connection String'
required: true
type: string
push:
branches: [ "main" ]
paths:
- 'tests/integration-tests/js/**'
pull_request:
branches: [ "main" ]
paths:
- 'tests/integration-tests/js/**'

jobs:
test:
runs-on: ubuntu-latest
env:
WEB_PUBSUB_CONNECTION_STRING: ${{ github.event.inputs.web_pubsub_connection_string || secrets.WEB_PUBSUB_CONNECTION_STRING }}
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Test js tests
run: |
cd tests/integration-tests/js
npm install
npm run test
66 changes: 66 additions & 0 deletions .github/workflows/integration-tests-python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Integration tests for Python

on:
workflow_dispatch:
inputs:
web_pubsub_connection_string:
description: 'Azure Web PubSub Connection String'
required: true
type: string
push:
branches: [ "main" ]
paths:
- 'tests/integration-tests/python/**'
pull_request:
branches: [ "main" ]
paths:
- 'tests/integration-tests/python/**'

jobs:
test:
runs-on: ubuntu-latest
env:
WEB_PUBSUB_CONNECTION_STRING: ${{ github.event.inputs.web_pubsub_connection_string || secrets.WEB_PUBSUB_CONNECTION_STRING }}
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Run tests
run: |
cd tests/integration-tests/python
python -m pip install --upgrade pip
pip install -r requirements.txt
pytest
post-test:
runs-on: ubuntu-latest
needs: test
if: failure()
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download test output
uses: actions/download-artifact@v3
with:
name: test-output
path: ./test-output
- name: Read test output
id: read-test-output
run: echo "TEST_OUTPUT=$(cat ./test-output/test-output.txt)" >> $GITHUB_ENV
- name: Fix error with deep prompt
run: |
node eng/copilot/fixErrorWithDeepPrompt.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
API_KEY: ${{ secrets.OPENAI_API_KEY }}
API_BASE: ${{ secrets.OPENAI_API_BASE }}
PR_ID: ${{ github.event.pull_request.number }}
TEST_OUTPUT: ${{ env.TEST_OUTPUT }}
44 changes: 44 additions & 0 deletions .github/workflows/release_admin_ui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release Socket.IO Admin UI

on:
push:
branches:
- main
paths:
- 'tools/azure-socketio-admin-ui/**'
pull_request:
branches:
- main
paths:
- 'tools/azure-socketio-admin-ui/**'

jobs:
build_pack_upload:
runs-on: ubuntu-latest
defaults:
run:
working-directory: tools/azure-socketio-admin-ui
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16

- name: Build and Pack
run: yarn install && yarn build

- name: Get Metadata
id: metadata_step
run: |
package_version=$(node -p "require('./package.json').version")
echo "package_version=${package_version}" >> $GITHUB_OUTPUT
echo "filename=azure-socketio-admin-ui-${package_version}" >> $GITHUB_OUTPUT
- name: Upload to Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ steps.metadata_step.outputs.filename }}
path: tools/azure-socketio-admin-ui/dist
Loading

0 comments on commit 6b59b8f

Please sign in to comment.