OpenSilver Validate PRs #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: OpenSilver Validate PRs | |
env: | |
next-release-version: '10.0.0' | |
on: | |
# Any pull request to develop | |
# pull_request: | |
# branches: | |
# - develop | |
workflow_dispatch: | |
jobs: | |
OpenSilver-Build: | |
runs-on: windows-latest | |
steps: | |
- uses: microsoft/setup-msbuild@v1.1 | |
- uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '6.0.202' | |
- name: Clone OpenSilver repo | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.ref }} | |
- name: Restore Packages | |
run: ./restore-packages-opensilver.bat | |
- name: Update compiler | |
run: ./build/update-compiler.bat | |
# There is the TestApplication for SL version in the Solution, so we need to build the latest SL package | |
- name: Format Version Suffix | |
id: format-suffix | |
run: echo "suffix=$(date +'%Y-%m-%d-%H%M%S')-${{ env.GITHUB_SHA_SHORT }}" >> $env:GITHUB_OUTPUT | |
- name: Format Package Version | |
id: format-version | |
run: echo "version=${{ env.next-release-version }}-preview-${{ steps.format-suffix.outputs.suffix }}" >> $env:GITHUB_OUTPUT | |
- name: Build OpenSilver NuGet package | |
run: ./build/build-nuget-package-OpenSilver.bat ${{ steps.format-version.outputs.version }} | |
- name: Build OpenSilver.Simulator NuGet package | |
run: ./build/build-nuget-package-OpenSilver.Simulator.bat ${{ steps.format-version.outputs.version }} | |
- name: Replace existing package with actual one | |
run: | | |
nuget sources Add -Name localbuild -Source "$(Get-Location)\build\output\OpenSilver" | |
dotnet add src\Tests\TestApplication\TestApplication\TestApplication.OpenSilver.csproj package OpenSilver -v ${{ steps.format-version.outputs.version }} | |
dotnet add src\Tests\TestApplication\TestApplication.OpenSilver.Browser\TestApplication.OpenSilver.Browser.csproj package OpenSilver -v ${{ steps.format-version.outputs.version }} | |
dotnet add src\Tests\TestApplication\TestApplication.OpenSilver.Simulator\TestApplication.OpenSilver.Simulator.csproj package OpenSilver.Simulator -v ${{ steps.format-version.outputs.version }} | |
- name: Drop all bin and obj folders | |
run: 'find . -iname "bin" -o -iname "obj" | xargs rm -rf' | |
shell: bash | |
- name: Verify Building of OpenSilver Solution Release Configuration | |
run: msbuild src/OpenSilver.sln -p:Configuration=Release -clp:ErrorsOnly -restore | |
- name: Run Compiler Tests Release Configuration | |
run: dotnet test src/Compiler/Tests/Compiler.Tests/bin/Release/net472/Compiler.Tests.dll | |
- name: Run Runtime Tests Release Configuration | |
run: dotnet test src/Tests/Runtime.OpenSilver.Tests/bin/Release/net472/Runtime.OpenSilver.Tests.dll | |
- name: Run Analyzers Tests Configuration | |
run: dotnet test src/Analyzers/NotImplemented.Tests/bin/Release/net472/OpenSilver.Analyzers.Tests.dll | |
- name: Verify Building of TestApplication | |
run: msbuild src/Tests/TestApplication/TestApplication.OpenSilver.sln -p:Configuration=Release -clp:ErrorsOnly -restore | |
- name: Drop all bin and obj folders | |
run: 'find . -iname "bin" -o -iname "obj" | xargs rm -rf' | |
shell: bash |