Fix the publish bits. #139
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: 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: 8.0.x | |
dotnet-quality: preview | |
- 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: 8.0.x | |
dotnet-quality: preview | |
- 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 |