Bump @types/node from 20.19.25 to 24.10.1 in /tests/e2e #40
Workflow file for this run
This file contains hidden or 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 | ||
|
Check failure on line 1 in .github/workflows/blazor-ci.yml
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| pull_request: | ||
| branches: [ main ] | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out code | ||
| uses: actions/checkout@v4 | ||
| - name: Set up .NET 8 | ||
| uses: actions/setup-dotnet@v4 | ||
| with: | ||
| dotnet-version: '8.0.x' | ||
| cache: true | ||
| - name: Restore dependencies | ||
| run: dotnet restore | ||
| - name: Build in Release mode | ||
| run: dotnet build --configuration Release --no-restore | ||
| - name: Run unit tests | ||
| run: dotnet test --configuration Release --no-build --collect:"XPlat Code Coverage" | ||
| - name: Publish for deploy | ||
| run: dotnet publish -c Release -o publish | ||
| - name: Upload artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: blazor-build | ||
| path: publish/wwwroot | ||
| deploy: | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| environment: | ||
| name: production | ||
| steps: | ||
| - name: Authenticate with Azure via OIDC | ||
| uses: azure/login@v1 | ||
| with: | ||
| client-id: ${{ secrets.AZURE_CLIENT_ID }} | ||
| tenant-id: ${{ secrets.AZURE_TENANT_ID }} | ||
| allow-no-subscriptions: true | ||
| - name: Download artifact | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: blazor-build | ||
| path: wwwroot | ||
| - name: Deploy to Azure Static Web Apps | ||
| id: swa | ||
| uses: Azure/static-web-apps-deploy@v2 | ||
| with: | ||
| azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }} | ||
| app_location: "wwwroot" | ||
| output_location: "" | ||
| skip_api_build: true | ||
| deployment_action: 'upload' | ||
| e2e: | ||
| needs: deploy | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| SITE_URL: ${{ needs.deploy.outputs.static_web_app_url }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Install Playwright | ||
| uses: npx playwright install --with-deps | ||
| - name: Install node dependencies | ||
| run: npm install --prefix tests/e2e | ||
| - name: Run smoke tests | ||
| run: npx playwright test --project=chromium --reporter=line | ||
| working-directory: tests/e2e | ||
| - name: Fail if Exceptions > 0 | ||
| uses: azure/cli@v1 | ||
| with: | ||
| inlineScript: | | ||
| count=$(az monitor app-insights query \ | ||
| --app MySite \ | ||
| --analytics-query "exceptions | where timestamp > ago(5m) | count" \ | ||
| --query "tables[0].rows[0][0]") | ||
| if [ $count -gt 0 ]; then | ||
| echo "::error::Application errors detected: $count" | ||
| exit 1 | ||
| fi | ||
| security: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out code | ||
| uses: actions/checkout@v4 | ||
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@v3 | ||
| with: | ||
| languages: csharp | ||
| - name: Set up .NET 8 | ||
| uses: actions/setup-dotnet@v4 | ||
| with: | ||
| dotnet-version: '8.0.x' | ||
| - name: Restore dependencies | ||
| run: dotnet restore | ||
| - name: Build in Release mode | ||
| run: dotnet build --configuration Release --no-restore | ||
| - name: Run CodeQL analysis | ||
| uses: github/codeql-action/analyze@v3 | ||