From 92561bff8744a8036ee9d96a54cb277a8d58f1af Mon Sep 17 00:00:00 2001 From: Jakub Date: Tue, 21 Jan 2025 22:35:56 +0100 Subject: [PATCH] rebuild --- .github/workflows/github-actions.yml | 27 ++++++++++++------- .../ExecutingTestsOnWindowsGithubActions1.ps1 | 8 +++--- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index c2f01303..35591b8e 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -214,16 +214,26 @@ jobs: check_name: test_Stage_RunTestsOnLinuxBrowserStack test_Stage_RunTestsOnWindowsCore1: runs-on: windows-latest - needs: - - build_Stage_BuildTestsOnWindows steps: - - uses: actions/download-artifact@v4 + - uses: actions/checkout@v4 + - uses: microsoft/setup-msbuild@v2 + - shell: powershell + run: '(Get-Content ''Ocaramba.sln'' -raw) -replace [regex](''.*?'' + ''Documentation'' + (''.*?\r\n'' * (5 + 1))) | set-content ''Ocaramba.sln''' + - name: Setup nuget + uses: nuget/setup-nuget@v2 with: - name: OcarambaBuild - - shell: cmd - run: | - 7z x "OcarambaBuild.zip" -o.\Ocaramba -y -bb0 - - run: ./Ocaramba/ExecutingTestsOnWindowsGithubActions1.ps1 + nuget-version: latest + - name: Cache + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}\.nuget\packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} #hash of project files + restore-keys: | + ${{ runner.os }}-nuget- + - name: NuGet restore + run: nuget restore ${{ env.solution }} + - run: msbuild '${{ env.solution }}' /p:configuration='${{ env.buildConfiguration }}' /p:platform='${{ env.buildPlatform }}' /v:minimal + - run: ./ExecutingTestsOnWindowsGithubActions1.ps1 - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action/windows@v2 if: always() @@ -304,7 +314,6 @@ jobs: ls export ASPNETCORE_ENVIRONMENT=Linux echo $ASPNETCORE_ENVIRONMENT - sudo apt-get install google-chrome-stable sed -i '/Documentation/,+5 d' ./Ocaramba.sln - run: dotnet build ./Ocaramba.sln --configuration ${{ env.buildConfiguration }} - shell: pwsh diff --git a/scripts/ExecutingTestsOnWindowsGithubActions1.ps1 b/scripts/ExecutingTestsOnWindowsGithubActions1.ps1 index 70bca650..be8f3a1e 100644 --- a/scripts/ExecutingTestsOnWindowsGithubActions1.ps1 +++ b/scripts/ExecutingTestsOnWindowsGithubActions1.ps1 @@ -2,11 +2,11 @@ echo '********************************************Executing tests*************** echo '********************************************net8.0 tests********************************************' -.\Ocaramba\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net8.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -json -.\Ocaramba\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net8.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -json -.\Ocaramba\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnitExtentReports\bin\Release\net8.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.NUnit\bin\Release\net8.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.Angular\bin\Release\net8.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.NUnitExtentReports\bin\Release\net8.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -json -dotnet vstest D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net8.0\Ocaramba.Tests.Angular.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net8.0\Ocaramba.Tests.NUnit.dll /TestCaseFilter:"(TestCategory!=TakingScreehShots)" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.netcoreapp.trx" +dotnet vstest .\Ocaramba.Tests.Angular\bin\Release\net8.0\Ocaramba.Tests.Angular.dll .\Ocaramba.Tests.NUnit\bin\Release\net8.0\Ocaramba.Tests.NUnit.dll /TestCaseFilter:"(TestCategory!=TakingScreehShots)" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.netcoreapp.trx" echo '********************************************net472 tests********************************************'