Skip to content

Update .NET SDK to 9.0.100-preview.4.24267.66 #1611

Update .NET SDK to 9.0.100-preview.4.24267.66

Update .NET SDK to 9.0.100-preview.4.24267.66 #1611

Workflow file for this run

name: lighthouse
on:
pull_request:
branches:
- main
- dotnet-vnext
- dotnet-nightly
workflow_dispatch:
permissions:
contents: read
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_MULTILEVEL_LOOKUP: 0
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: 1
NUGET_XMLDOC_MODE: skip
TERM: xterm
jobs:
lighthouse:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Setup .NET SDK
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0
- name: Start website
shell: pwsh
env:
ConnectionStrings__Cosmos: 'AccountKey=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==;AccountEndpoint=https://localhost:8081;DisableServerCertificateValidation=True;'
run: |
Push-Location (Join-Path "src" "LondonTravel.Site")
npm ci
npm run build
Pop-Location
Start-Process nohup 'dotnet run --project ./src/LondonTravel.Site/LondonTravel.Site.csproj --configuration Release /p:EnableNETAnalyzers=false /p:EnforceCodeStyleInBuild=false'
$StatusCode = 0
$Attempts = 0
While ($Attempts -lt 10) {
$Response = Try {
Invoke-WebRequest "https://localhost:50001" -SkipCertificateCheck
} catch {
$_.Exception.Response
}
$StatusCode = $Response.StatusCode
If ($StatusCode -eq 200) {
break
}
$Attempts++
Start-Sleep -Seconds 10
}
If ($StatusCode -ne 200) {
throw "Failed to successfully connect to website after $Attempts attempts."
}
New-Item -Path "${env:GITHUB_WORKSPACE}/artifacts/lighthouse" -ItemType Directory | Out-Null
- name: Lighthouse
uses: foo-software/lighthouse-check-action@a80267da2e0244b8a2e457a8575fc47590615852 # v12.0.1
id: lighthouse
with:
device: 'all'
gitHubAccessToken: ${{ secrets.LIGHTHOUSE_ACCESS_TOKEN }}
outputDirectory: ${{ github.workspace }}/artifacts/lighthouse
prCommentEnabled: true
urls: 'https://localhost:50001'
wait: true
- name: Check Lighthouse scores
uses: foo-software/lighthouse-check-status-action@2b9d5101f7a0de86ddb153a0d77ad7046aac1052 # v3.0.1
with:
lighthouseCheckResults: ${{ steps.lighthouse.outputs.lighthouseCheckResults }}
minAccessibilityScore: '90'
minBestPracticesScore: '83'
minPerformanceScore: '71'
minProgressiveWebAppScore: '85'
minSeoScore: '100'
- name: Publish artifacts
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
if: ${{ !cancelled() }}
with:
name: lighthouse
path: ${{ github.workspace }}/artifacts/lighthouse
if-no-files-found: ignore