forked from OpenSilver/OpenSilver
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (60 loc) · 3.33 KB
/
validate-prs.yml
File metadata and controls
60 lines (60 loc) · 3.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: OpenSilver Validate PRs
env:
next-release-version: '10.0.0'
on:
# Any pull request to develop
pull_request:
branches:
- develop
jobs:
OpenSilver-Build:
runs-on: windows-latest
steps:
- uses: microsoft/setup-msbuild@v1.1
- uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.x'
dotnet-quality: 'ga'
- 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-nuget-packages.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: Build OpenSilver.WebAssembly NuGet package
run: ./build/build-nuget-package-OpenSilver.Wasm.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.WebAssembly -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.slnx -p:Configuration=Release -clp:ErrorsOnly -restore
- name: Run Compiler Tests Release Configuration
run: dotnet test src/Compiler/Tests/Compiler.Tests/bin/Release/net10.0/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/net10.0/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