Skip to content

Commit

Permalink
Adding workflow for integration testing processes in all runtimes. (#…
Browse files Browse the repository at this point in the history
…9649)

Adding workflow for automated integration testing of Processes across
all supported runtimes.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
  • Loading branch information
alliscode authored Nov 11, 2024
1 parent 7d9f834 commit 7b0e32a
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/dotnet-integration-tests-processes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#
# This workflow will run all dotnet integrations tests.
#

name: dotnet-integration-tests-processes

on:
workflow_dispatch:
pull_request:
branches: ["main"]
merge_group:
branches: ["main"]

permissions:
contents: read

jobs:
integration-tests:
strategy:
matrix:
os: [ubuntu-latest]
configuration: [Debug]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
if: ${{ github.event_name != 'pull_request' }}
with:
clean: true

- name: Setup .NET
uses: actions/setup-dotnet@v4
if: ${{ github.event_name != 'pull_request' }}
with:
dotnet-version: 8.0.x

- name: Find projects
shell: bash
if: ${{ github.event_name != 'pull_request' }}
run: echo "projects=$(find ./dotnet -type f -name "Process.IntegrationTestRunner.*.csproj" | tr '\n' ' ')" >> $GITHUB_ENV

- name: Set up Dapr
uses: dapr/setup-dapr@v1
with:
dapr-version: "1.14.1"

- name: Verify Dapr installation
run: dapr --version

- name: Initialize Dapr runtime
run: dapr init

- name: Process Integration Tests
shell: bash
if: ${{ github.event_name != 'pull_request' }}
env: # Set Azure credentials secret as an input
AzureOpenAI__Label: azure-text-davinci-003
AzureOpenAIEmbedding__Label: azure-text-embedding-ada-002
AzureOpenAI__DeploymentName: ${{ vars.AZUREOPENAI__DEPLOYMENTNAME }}
AzureOpenAIEmbeddings__DeploymentName: ${{ vars.AZUREOPENAIEMBEDDING__DEPLOYMENTNAME }}
AzureOpenAI__Endpoint: ${{ secrets.AZUREOPENAI__ENDPOINT }}
AzureOpenAIEmbeddings__Endpoint: ${{ secrets.AZUREOPENAI__ENDPOINT }}
AzureOpenAI__ApiKey: ${{ secrets.AZUREOPENAI__APIKEY }}
AzureOpenAIEmbeddings__ApiKey: ${{ secrets.AZUREOPENAI__APIKEY }}
Bing__ApiKey: ${{ secrets.BING__APIKEY }}
OpenAI__ApiKey: ${{ secrets.OPENAI__APIKEY }}
run: |
for project in ${{ env.projects }}; do
dotnet test $project --verbosity normal --logger trx --results-directory ./TestResults --configuration ${{ matrix.configuration }}
done
- name: Upload dotnet test results
uses: actions/upload-artifact@v4
with:
name: dotnet-testresults-${{ matrix.configuration }}
path: ./TestResults
if: ${{ github.event_name != 'pull_request' && always() }}

0 comments on commit 7b0e32a

Please sign in to comment.