SWA sample + tests #44
Workflow file for this run
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
# This workflow will build a .NET project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
name: .NET CI | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
DCP_PRESERVE_EXECUTABLE_LOGS: "yes" | |
DCP_DIAGNOSTICS_LOG_FOLDER: ${{ github.workspace }}/diagnostics | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: "microsoft" | |
java-version: "21" | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "latest" | |
- name: Install Aspire workload | |
run: dotnet workload install aspire | |
- name: Setup .NET dev certs | |
run: | | |
dotnet tool update -g linux-dev-certs | |
dotnet linux-dev-certs install | |
- name: Install SWA emulator | |
run: | | |
npm install -g @azure/static-web-apps-cli | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore | |
- name: Test | |
run: dotnet test --no-build --verbosity normal | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: build-output | |
path: | | |
${{ github.workspace }}/diagnostics/** |