diff --git a/.github/workflows/pr_ci.yml b/.github/workflows/pr_ci.yml
index d124aa02b19..fe3dd941994 100644
--- a/.github/workflows/pr_ci.yml
+++ b/.github/workflows/pr_ci.yml
@@ -1,10 +1,13 @@
name: PR - CI
-on:
+
+on:
pull_request:
branches: [ main, release/** ]
+
env:
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
+ DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
+
jobs:
build_test:
runs-on: ${{ matrix.os }}
@@ -14,20 +17,54 @@ jobs:
os: [ubuntu-latest, windows-latest]
name: Build & Test
steps:
+
- uses: actions/checkout@v3
- - uses: actions/setup-node@v3
- with:
- node-version: "15"
- - name: Setup .NET 6.0
+ name: Checkout source code
+
+ - name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v3
+ with:
+ node-version: "16"
+
+ # https://github.com/actions/cache/blob/main/workarounds.md#improving-cache-restore-performance-on-windowsusing-cross-os-caching
+ - if: ${{ runner.os == 'Windows' }}
+ name: Use GNU tar
+ shell: cmd
+ run: |
+ echo "Adding GNU tar to PATH"
+ echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%"
+
+ # caching all generated nuget items so we don't need to call restore
+ - uses: actions/cache@v3
+ id: cache-nuget
+ name: Cached NuGet artifacts
+ with:
+ path: |
+ ~/.nuget/packages
+ **/obj/project.*
+ **/obj/*.csproj.nuget.*
+ key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json', '**/Dependencies.props', '**/Dependencies.AspNetCore.props', '**/Directory.Packages.props') }}
+ restore-keys: |
+ ${{ runner.os }}-nuget-
+
+ - name: Restore
+ if: steps.cache-nuget.outputs.cache-hit != 'true'
+ run: |
+ dotnet restore /p:DisableImplicitNuGetFallbackFolder=true /p:DisableImplicitLibraryPacksFolder
+
- name: Build
run: |
- dotnet build --configuration Release --framework net6.0
+ dotnet build -c Release --no-restore --framework net6.0 /p:IncludeSymbols=false /p:CreateHardLinksForCopyLocalIfPossible=true /p:CreateHardLinksForCopyFilesToOutputDirectoryIfPossible=true /p:CreateHardLinksForPublishFilesIfPossible=true
+
- name: Unit Tests
run: |
- dotnet test -c Release --no-restore --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj
+ dotnet test -c Release --no-restore --no-build --framework net6.0 ./test/OrchardCore.Tests/OrchardCore.Tests.csproj
+
- name: Functional Tests
if: matrix.os == 'ubuntu-latest'
run: |
@@ -35,11 +72,12 @@ jobs:
npm install
npm run cms:test
npm run mvc:test
- - uses: actions/upload-artifact@v2
+
+ - uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest' && failure()
with:
name: functional-test-failure
path: |
test/OrchardCore.Tests.Functional/cms-tests/cypress/screenshots
src/OrchardCore.Cms.Web/App_Data/logs
-
+
diff --git a/src/OrchardCore.Build/OrchardCore.Commons.targets b/src/OrchardCore.Build/OrchardCore.Commons.targets
index 624f6a0819a..853a486a381 100644
--- a/src/OrchardCore.Build/OrchardCore.Commons.targets
+++ b/src/OrchardCore.Build/OrchardCore.Commons.targets
@@ -35,4 +35,18 @@
File="$(MSBuildProjectFullPath)" />
+
+
+
+ false
+
+
+ false
+
+
+
+
diff --git a/src/OrchardCore.Cms.Web/OrchardCore.Cms.Web.csproj b/src/OrchardCore.Cms.Web/OrchardCore.Cms.Web.csproj
index 62a73532bfc..a031aa053b5 100644
--- a/src/OrchardCore.Cms.Web/OrchardCore.Cms.Web.csproj
+++ b/src/OrchardCore.Cms.Web/OrchardCore.Cms.Web.csproj
@@ -1,4 +1,4 @@
-
+
diff --git a/src/OrchardCore.Mvc.Web/OrchardCore.Mvc.Web.csproj b/src/OrchardCore.Mvc.Web/OrchardCore.Mvc.Web.csproj
index f0f9f2734d9..457579dfdf5 100644
--- a/src/OrchardCore.Mvc.Web/OrchardCore.Mvc.Web.csproj
+++ b/src/OrchardCore.Mvc.Web/OrchardCore.Mvc.Web.csproj
@@ -1,4 +1,4 @@
-
+
diff --git a/test/OrchardCore.Tests.Pages/OrchardCore.Application.Pages/OrchardCore.Application.Pages.csproj b/test/OrchardCore.Tests.Pages/OrchardCore.Application.Pages/OrchardCore.Application.Pages.csproj
index a5287a6f720..cf40dfa8d87 100644
--- a/test/OrchardCore.Tests.Pages/OrchardCore.Application.Pages/OrchardCore.Application.Pages.csproj
+++ b/test/OrchardCore.Tests.Pages/OrchardCore.Application.Pages/OrchardCore.Application.Pages.csproj
@@ -1,4 +1,4 @@
-
+