Skip to content

Commit

Permalink
KX-11806 - Replace dotnet-format actions
Browse files Browse the repository at this point in the history
- update actions to latest versions available
- update readme to include Kentico and CI badges
  • Loading branch information
Rosalko authored and RobertZ committed Mar 15, 2024
1 parent 299254f commit 9a75fd3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 15 deletions.
37 changes: 22 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ on:
- "**/Client/**/*.json"
- "**/ci.yml"


jobs:
dotnet-format:
name: Format
Expand All @@ -41,17 +40,29 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Add dotnet-format problem matcher
uses: xt0rted/dotnet-format-problem-matcher@v1
- name: Get changed files
if: github.event_name == 'push'
run: |
$CHANGED_FILES = (git diff --name-only ${{ github.event.before }} ${{ github.sha }}) -replace '\n',' '
echo "CHANGED_FILES=$CHANGED_FILES" | Out-File -FilePath $Env:GITHUB_ENV -Append
- name: Restore dotnet tools
uses: xt0rted/dotnet-tool-restore@v1
- name: Get changed files in PR
if: github.event_name == 'pull_request'
run: |
$CHANGED_FILES = (git diff --name-only origin/${{ github.base_ref }} ${{ github.sha }}) -replace '\n',' '
echo "CHANGED_FILES=$CHANGED_FILES" | Out-File -Append -FilePath $Env:GITHUB_ENV
- name: Run dotnet format
uses: xt0rted/dotnet-format@v1
with:
only-changed-files: "true"
run: |
$files = $Env:CHANGED_FILES -split ' '
if ($files.Length -eq 0) {
Write-Host "No relevant files have changed."
} else {
dotnet format ./src/WebApp.sln --verify-no-changes --include $files
}
build-and-test:
Expand All @@ -63,18 +74,14 @@ jobs:
shell: pwsh
working-directory: ${{ env.working-directory }}


steps:
- uses: actions/checkout@v4

- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2

- name: Setup NuGet
uses: NuGet/setup-nuget@v1.0.5

- name: Setup VSTest
uses: darenm/Setup-VSTest@v1
uses: NuGet/setup-nuget@v2

- name: Restore Packages
run: nuget restore WebApp.sln
Expand All @@ -83,5 +90,5 @@ jobs:
run: msbuild.exe WebApp.sln /p:platform="Any CPU" /p:configuration="Release"

- name: Test Solution
run: vstest.console.exe Kentico.Xperience.OpenAI.Azure.Tests\bin\Release\net48\Kentico.Xperience.OpenAI.Azure.Tests.dll

run: dotnet test Kentico.Xperience.OpenAI.Azure.Tests\bin\Release\net48\Kentico.Xperience.OpenAI.Azure.Tests.dll

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Xperience Azure OpenAI integration

[![7-day bug-fix policy](https://img.shields.io/badge/-7--days_bug--fixing_policy-grey?labelColor=orange&logo=data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ic3ZnLWljb24iIHN0eWxlPSJ3aWR0aDogMWVtOyBoZWlnaHQ6IDFlbTt2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO2ZpbGw6IGN1cnJlbnRDb2xvcjtvdmVyZmxvdzogaGlkZGVuOyIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik04ODguNDkgMjIyLjY4NnYtMzEuNTRsLTY1LjY3Mi0wLjk1NWgtMC4yMDVhNDY1LjcxNSA0NjUuNzE1IDAgMCAxLTE0NC4zMTUtMzEuMzM0Yy03Ny4wMDUtMzEuMTk4LTEyNi4yOTQtNjYuNzY1LTEyNi43MDMtNjcuMTA3bC0zOS44LTI4LjY3Mi0zOS4xODUgMjguNDY4Yy0yLjA0OCAxLjUwMS00OS45MDMgMzYuMDQ0LTEyNi45MDggNjcuMzFhNDQ3LjQyIDQ0Ny40MiAwIDAgMS0xNDQuNTIgMzEuMzM1bC02NS44NzcgMC45NTZ2Mzc4Ljg4YzAgODcuMDQgNDkuODM0IDE4NC42NjEgMTM3LjAxIDI2Ny44MSAzNy41NDcgMzUuODQgNzkuMjU4IDY2LjM1NSAxMjAu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IgMzIuMjIyIDAgMCAwIDAgNDUuMjZsMTE1Ljg1IDExNS44NWEzMi4yOSAzMi4yOSAwIDAgMCA0NS4zMjggMEw3MTMuMzIgNDEzLjlhMzIuMjIyIDMyLjIyMiAwIDAgMCAwLTQ1LjMzeiIgIC8+PC9zdmc+)](https://github.com/Kentico/.github/blob/main/SUPPORT.md#full-support) [![CI: Build Validation](https://github.com/Kentico/xperience-module-openai-azure/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/Kentico/xperience-module-openai-azure/actions/workflows/ci.yml) [![NuGet Package](https://img.shields.io/nuget/v/Kentico.Xperience.OpenAI.Azure.KX13.svg)](https://www.nuget.org/packages/Kentico.Xperience.OpenAI.Azure.KX13)


This custom module allows Kentico Xperience 13 users to [automatically select](https://docs.kentico.com/x/IgqRBg) the best fitting categories for a page based on its content using [Azure OpenAI](https://azure.microsoft.com/en-us/products/ai-services/openai-service).

## Compatibility
Expand Down

0 comments on commit 9a75fd3

Please sign in to comment.