-
-
Notifications
You must be signed in to change notification settings - Fork 30
81 lines (69 loc) · 2.28 KB
/
build-validation.yml
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: build and test
on:
push:
branches: [ main ]
paths-ignore:
- README.md
workflow_dispatch:
inputs:
reason:
description: The reason for running the workflow
required: true
default: Manual run
jobs:
build:
name: build
runs-on: ubuntu-latest
strategy:
matrix:
project:
- Blazor.SourceGenerators
- Blazor.Serialization
- Blazor.LocalStorage.WebAssembly
- Blazor.LocalStorage
- Blazor.SessionStorage.WebAssembly
- Blazor.SessionStorage
- Blazor.Geolocation.WebAssembly
- Blazor.Geolocation
- Blazor.SpeechSynthesis.WebAssembly
- Blazor.SpeechSynthesis
- Blazor.SpeechRecognition.WebAssembly
- Blazor.SpeechRecognition
steps:
- uses: actions/checkout@main
- name: 'Print manual run reason'
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
echo 'Reason: ${{ github.event.inputs.reason }}'
- name: Setup .NET
uses: actions/setup-dotnet@main
with:
dotnet-version: 9.0.x
- name: Restore dependencies for ${{ matrix.project }}
run: |
dotnet restore ./src/${{ matrix.project }}/${{ matrix.project }}.csproj
- name: Build ${{ matrix.project }}
run: |
dotnet build ./src/${{ matrix.project }}/${{ matrix.project }}.csproj --configuration Release --no-restore
test:
name: test
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@main
- name: Setup .NET
uses: actions/setup-dotnet@main
with:
dotnet-version: 9.0.x
- name: Run tests
run: |
dotnet test ./tests/Blazor.SourceGenerators.Tests/Blazor.SourceGenerators.Tests.csproj --verbosity normal
- name: Build end-to-end tests
run: |
dotnet build ./tests/Blazor.ExampleConsumer.EndToEndTests/Blazor.ExampleConsumer.EndToEndTests.csproj --configuration Release
- name: Install Playwright dependencies
run: |
pwsh ./tests/Blazor.ExampleConsumer.EndToEndTests/bin/Release/net8.0/playwright.ps1 install --with-deps
- name: Run end-to-end tests
run: |
dotnet test ./tests/Blazor.ExampleConsumer.EndToEndTests/Blazor.ExampleConsumer.EndToEndTests.csproj --verbosity normal