build-integrationtest #544
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This workflow will build and run all unit tests using dotnet docker containers, | |
# each targeting a single version of the dotnet SDK. | |
# | |
name: build-integrationtest | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: [ "main" ] | |
merge_group: | |
branches: ["main"] | |
schedule: | |
- cron: "0 7 * * *" # Run at midnight PDT every day | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
build-integrationtest: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- { dotnet: '7.0-jammy', os: 'ubuntu', configuration: Release } | |
runs-on: ubuntu-latest | |
container: | |
image: mcr.microsoft.com/dotnet/sdk:${{ matrix.dotnet }} | |
env: | |
NUGET_CERT_REVOCATION_MODE: offline | |
GITHUB_ACTIONS: 'true' | |
steps: | |
- uses: actions/checkout@v3 | |
if: ${{ github.event_name != 'pull_request' }} | |
- name: Build dotnet solutions | |
if: ${{ github.event_name != 'pull_request' }} | |
run: | | |
export SOLUTIONS=$(find ./ -type f -name "*.sln" | tr '\n' ' ') | |
for solution in $SOLUTIONS; do | |
dotnet build -c ${{ matrix.configuration }} /warnaserror $solution | |
done | |
- name: Run Tests | |
shell: bash | |
if: ${{ github.event_name != 'pull_request' }} | |
env: # Set Azure credentials secret as an input | |
AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_ENDPOINT }} | |
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_API_KEY }} | |
OPENAI_MODEL: ${{ secrets.AZURE_COMPLETION_MODEL }} | |
OPENAI_EMBEDDINGMODEL: ${{ secrets.AZURE_EMBEDDING_MODEL }} | |
run: | | |
dotnet test -c ${{ matrix.configuration }} tests/TypeChat.IntegrationTests/TypeChat.IntegrationTests.csproj --no-build -v Normal --logger trx |