Skip to content

Scale tone/v6.5 (#205) #51

Scale tone/v6.5 (#205)

Scale tone/v6.5 (#205) #51

Workflow file for this run

name: main-build
on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: create ArtifactStagingDirectory folder
run: mkdir drop
# Building and copying React
- name: npm install durablefunctionsmonitor.react
run: npm install -legacy-peer-deps
working-directory: durablefunctionsmonitor.react
- name: npm build durablefunctionsmonitor.react
run: npm run build
working-directory: durablefunctionsmonitor.react
- name: copy statics to durablefunctionsmonitor.dotnetbackend/DfmStatics
run: |
rm -rf durablefunctionsmonitor.dotnetbackend/DfmStatics
cp -r durablefunctionsmonitor.react/build durablefunctionsmonitor.dotnetbackend/DfmStatics
- name: copy statics to durablefunctionsmonitor.dotnetisolated/DfmStatics
run: |
rm -rf durablefunctionsmonitor.dotnetisolated/DfmStatics
cp -r durablefunctionsmonitor.react/build durablefunctionsmonitor.dotnetisolated/DfmStatics
# Building and testing .NET
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: dotnet test tests/durablefunctionsmonitor.dotnetbackend.tests
run: dotnet test tests/durablefunctionsmonitor.dotnetbackend.tests/*.csproj
- name: dotnet test tests/durablefunctionsmonitor.dotnetisolated.core.tests
run: dotnet test tests/durablefunctionsmonitor.dotnetisolated.core.tests/*.csproj
- name: copy durablefunctionsmonitor.dotnetbackend to ArtifactStagingDirectory
run: cp -r durablefunctionsmonitor.dotnetbackend drop/durablefunctionsmonitor.dotnetbackend
- name: copy durablefunctionsmonitor.dotnetisolated to ArtifactStagingDirectory
run: cp -r durablefunctionsmonitor.dotnetisolated drop/durablefunctionsmonitor.dotnetisolated
- name: dotnet publish durablefunctionsmonitor.dotnetbackend
run: dotnet publish durablefunctionsmonitor.dotnetbackend --output drop/durablefunctionsmonitor.dotnetbackend/output
- name: dotnet publish durablefunctionsmonitor.dotnetisolated
run: dotnet publish durablefunctionsmonitor.dotnetisolated --output drop/durablefunctionsmonitor.dotnetisolated/output
# Building and testing vscode extension
- name: copy dotnetbackend to durablefunctionsmonitor-vscodeext/backend
run: cp -r drop/durablefunctionsmonitor.dotnetbackend/output durablefunctionsmonitor-vscodeext/backend
- name: copy custom-backends to durablefunctionsmonitor-vscodeext/custom-backends
run: cp -r custom-backends durablefunctionsmonitor-vscodeext/custom-backends
- name: npm install durablefunctionsmonitor-vscodeext
run: npm install
working-directory: durablefunctionsmonitor-vscodeext
- name: npm install -g azure-functions-core-tools@4
run: npm install -g azure-functions-core-tools@4
working-directory: durablefunctionsmonitor-vscodeext
- name: run tests on durablefunctionsmonitor-vscodeext
# TODO: vscode test pipeline was broken, need to investigate and fix
if: 'false'
run: npm run test
working-directory: durablefunctionsmonitor-vscodeext
- name: package durablefunctionsmonitor-vscodeext to VSIX-file
run: npm run package
working-directory: durablefunctionsmonitor-vscodeext
- name: copy VSIX-file to ArtifactStagingDirectory
run: cp durablefunctionsmonitor-vscodeext/durablefunctionsmonitor*.vsix drop
# Building nuget packages
- name: copy LICENSE to durablefunctionsmonitor.dotnetbackend/output
run: cp LICENSE drop/durablefunctionsmonitor.dotnetbackend/output
- name: copy LICENSE.txt to durablefunctionsmonitor.dotnetisolated/output
run: cp durablefunctionsmonitor.dotnetisolated/LICENSE.txt drop/durablefunctionsmonitor.dotnetisolated/output
- name: Install latest nuget.exe
uses: nuget/[email protected]
- name: package dotnetbackend into a Nuget package
run: nuget pack drop/durablefunctionsmonitor.dotnetbackend/output/nuspec.nuspec -OutputDirectory drop
- name: package dotnetisolated into a Nuget package
run: nuget pack drop/durablefunctionsmonitor.dotnetisolated/output/nuspec.nuspec -OutputDirectory drop
# Publish artifacts
- name: publish artifacts
uses: actions/[email protected]
with:
path: drop