Fix function writer #13378
Workflow file for this run
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
name: .NET | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
paths-ignore: | |
[ | |
"abstractions/**", | |
"authentication/**", | |
"serialization/**", | |
"http/**", | |
"**.md", | |
".vscode/**", | |
"**.svg", | |
] | |
pull_request: | |
paths-ignore: | |
[ | |
"abstractions/**", | |
"authentication/**", | |
"serialization/**", | |
"http/**", | |
"**.md", | |
".vscode/**", | |
"**.svg", | |
] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.x | |
- name: Restore dependencies | |
run: dotnet restore kiota.sln | |
- name: Check formatting | |
run: dotnet format --verify-no-changes | |
- name: Build | |
run: dotnet build kiota.sln --no-restore | |
- name: Test | |
run: dotnet test kiota.sln --no-build --verbosity normal --collect:"XPlat Code Coverage" | |
- name: Install report generator | |
run: dotnet tool install --global dotnet-reportgenerator-globaltool | |
- name: Generate coverage report | |
run: reportgenerator -reports:**/coverage.cobertura.xml -targetdir:./reports/coverage | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: coverage | |
path: reports/coverage | |
test-release: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.x | |
- name: Restore dependencies | |
run: dotnet restore kiota.sln | |
- name: Publish ${{ matrix.os }} | |
run: dotnet publish ./src/kiota/kiota.csproj -c Release -p:PublishSingleFile=true -o ./${{ matrix.os }} | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.os }} | |
path: ./${{ matrix.os }} | |
# Mac and Linux | |
- name: Isolate the binary | |
if: runner.os != 'Windows' | |
run: | | |
mkdir ./${{ matrix.os }}-standalone | |
cp ./${{ matrix.os }}/kiota ./${{ matrix.os }}-standalone/kiota | |
- name: Check the built in default settings | |
if: runner.os != 'Windows' | |
run: | | |
INFO_RESULT=$(./${{ matrix.os }}-standalone/kiota info -l Java) | |
if [[ $INFO_RESULT == *"maturity level"* ]]; then | |
echo "Built in defaults are working" | |
else | |
echo "Built in defaults NOT working" | |
./${{ matrix.os }}/kiota info -l Java | |
exit 1 | |
fi | |
# Win | |
- name: Isolate the binary | |
if: runner.os == 'Windows' | |
run: | | |
mkdir ./${{ matrix.os }}-standalone | |
cp ./${{ matrix.os }}/kiota.exe ./${{ matrix.os }}-standalone/kiota.exe | |
- name: Check the built in default settings | |
if: runner.os == 'Windows' | |
shell: bash | |
run: | | |
INFO_RESULT=$(./${{ matrix.os }}-standalone/kiota.exe info -l Java) | |
if [[ $INFO_RESULT == *"maturity level"* ]]; then | |
echo "Built in defaults are working" | |
else | |
echo "Built in defaults NOT working" | |
./${{ matrix.os }}/kiota info -l Java | |
exit 1 | |
fi |