Skip to content

Commit

Permalink
#8819: Compile workflow should run at least one of the SpecFlow tests (
Browse files Browse the repository at this point in the history
…#8820)

* Using Title Casing in the Compile workflow's step names

* Adding step to run the Setup with SpecFlow

* Fixing typo

* Fixing that upgrading Newtonsoft.Json to 13.x broke the SpecFlow test execution app
  • Loading branch information
BenedekFarkas authored Dec 7, 2024
1 parent ebae790 commit c3b98ba
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
shell: pwsh
runs-on: windows-latest
steps:
- name: Clone repository
- name: Clone Repository
uses: actions/[email protected]

- name: Restore NuGet packages
- name: Restore NuGet Packages
run: nuget restore src/Orchard.sln

- name: Add msbuild to PATH
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2

- name: Compile
Expand All @@ -31,14 +31,19 @@ jobs:
- name: Test
run: msbuild Orchard.proj /m /v:minimal /t:Test

- name: Run Orchard setup
- name: Test Setup with SpecFlow
run: |
$nunitConsole = (Get-ChildItem -Path 'src/packages' -Recurse -Filter 'nunit-console.exe' | Select-Object -Last 1).FullName
& $nunitConsole 'build/Compile/Orchard.Specs.dll' /xml='build/Orchard.Specs.xml' /run=Orchard.Specs.SetupFeature.RootAndSetupFolderShowsSetupScreenAndFormValuesAreValidated
- name: Run Orchard Setup with Orchard.exe
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
- name: Run Code Generation
run: |
$commandFile = 'src/Orchard.Web/bin/codegen-commands.txt'
New-Item -Path $commandFile -ItemType File -Force
Expand All @@ -50,25 +55,25 @@ jobs:
'@
& 'src/Orchard.Web/bin/Orchard.exe' @$commandFile
- name: Compile with generated projects
- name: Compile Again with Generated Projects
run: msbuild Orchard.proj /m /v:minimal /t:Compile /p:TreatWarningsAsErrors=true -WarnAsError /NoWarn:CS2008

compile-node:
name: Compile client-side assets
name: Compile Client-side Assets
defaults:
run:
shell: pwsh
runs-on: windows-latest
steps:
- name: Clone repository
- name: Clone Repository
uses: actions/[email protected]

- name: Setup NodeJS
uses: actions/[email protected]
with:
node-version: '7'

- name: Setup NPM packages
- name: Setup NPM Packages
working-directory: ./src
run: |
npm install --loglevel warn
Expand All @@ -77,7 +82,7 @@ jobs:
$gulpVersion = (Get-Content Package.json -Raw | ConvertFrom-Json).devDependencies.gulp
Start-Process npm -NoNewWindow -Wait -ArgumentList "install gulp@$gulpVersion -g --loglevel warn"
- name: Rebuild client-side assets
- name: Rebuild Client-side Assets
working-directory: ./src
run: |
gulp rebuild
Expand Down
2 changes: 1 addition & 1 deletion src/Orchard.Specs/Hosting/Orchard.Web/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4" culture="neutral" />
Expand Down

0 comments on commit c3b98ba

Please sign in to comment.