From 8f9317048686bdc4ff9f2a834ade966eb84709fe Mon Sep 17 00:00:00 2001 From: Benedek Farkas Date: Fri, 29 Nov 2024 12:25:48 +0100 Subject: [PATCH] Updating Compile workflow with setup and code generation steps --- .github/workflows/compile.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 602548d78..d25649a61 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -26,11 +26,33 @@ jobs: uses: microsoft/setup-msbuild@v2 - name: Compile - run: msbuild Orchard.proj /m /v:minimal /t:Compile /p:MvcBuildViews=true /p:TreatWarningsAsErrors=true -WarnAsError + run: msbuild Orchard.proj /m /v:minimal /t:Compile /p:TreatWarningsAsErrors=true -WarnAsError /p:MvcBuildViews=true - name: Test run: msbuild Orchard.proj /m /v:minimal /t:Test + - name: Run Orchard setup + run: | + $commandFile = "src/Orchard.Web/bin/setup-commands.txt" + New-Item -Path $commandFile -ItemType File -Force + Set-Content -Path $commandFile -Value 'setup /SiteName:Orchard /AdminUsername:admin /AdminPassword:Password1! /DatabaseProvider:SqlCe /Recipe:Default' + & "src/Orchard.Web/bin/Orchard.exe" @$commandFile + + - name: Run code generation + run: | + $commandFile = "src/Orchard.Web/bin/codegen-commands.txt" + New-Item -Path $commandFile -ItemType File -Force + Set-Content -Path $commandFile -Value @' + feature enable Orchard.CodeGeneration + codegen module Orchard.CodeGeneration.TestModule + codegen theme Orchard.CodeGeneration.TestTheme /CreateProject:true + codegen moduletests Orchard.CodeGeneration.TestModule + '@ + & "src/Orchard.Web/bin/Orchard.exe" @$commandFile + + - name: Compile with generated projects + run: msbuild Orchard.proj /m /v:minimal /t:Compile /p:TreatWarningsAsErrors=true -WarnAsError + compile-node: name: Compile client-side assets defaults: