Skip to content

Issue 45: Updated method ContentHelper.FormatJson() to use `JToken.… #165

Issue 45: Updated method ContentHelper.FormatJson() to use `JToken.…

Issue 45: Updated method ContentHelper.FormatJson() to use `JToken.… #165

Workflow file for this run

name: LogicAppUnit-Build
on:
push:
branches:
- main
- 'features/**'
pull_request:
branches:
- main
workflow_dispatch:
jobs:
Build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest] # macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
# Build .NET solution
- name: Restore dependencies
run: dotnet restore ${{ github.workspace }}/src/LogicAppUnit.sln
- name: Build
run: dotnet build ${{ github.workspace }}/src/LogicAppUnit.sln --no-restore
# Install and configure Logic Apps runtime environment
- name: Install Functions Core tools
run: 'npm install -g azure-functions-core-tools@4 --unsafe-perm true'
- name: Set Functions Core tools path (Windows only)
if: matrix.os == 'windows-latest'
run: 'setx /m Path "C:\npm\prefix\node_modules\azure-functions-core-tools\bin;%Path%"'
shell: cmd
- name: Install Azurite
run: 'npm install -g [email protected]'
- name: Start Azurite services
run: 'azurite &'
shell: bash
# Check software versions
- name: Check dotnet SDK installation
run: 'dotnet --info'
- name: Check node installation
run: 'node --version'
- name: Check Functions Core tools installation
run: 'func --version'
# Run tests
- name: Run tests
if: success() && matrix.os != 'windows-latest'
run: dotnet test ${{ github.workspace }}/src/LogicAppUnit.sln --no-restore --verbosity normal --logger "trx" --filter TestCategory!="WindowsOnly"
- name: Run tests
if: success() && matrix.os == 'windows-latest'
run: dotnet test ${{ github.workspace }}/src/LogicAppUnit.sln --no-restore --verbosity normal --logger "trx"
# Publish artefacts and test results
- name: Publish test log
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-results.${{ matrix.os }}
path: ${{ github.workspace }}/src/LogicAppUnit.Samples.LogicApps.Tests/TestResults/*.trx
- name: Publish test results
if: (success() || failure()) && github.event_name != 'pull_request'
uses: dorny/test-reporter@v2
with:
name: Test Results (${{ matrix.os }})
path: ${{ github.workspace }}/src/LogicAppUnit.Samples.LogicApps.Tests/TestResults/*.trx
path-replace-backslashes: true
reporter: dotnet-trx