Updating Compile workflow with setup and code generation steps

This commit is contained in:
Benedek Farkas 2024-11-29 12:25:48 +01:00
parent 81570fab35
commit 8f93170486

View File

@ -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: