Bump eslint from 8.51.0 to 8.52.0 in /src/LondonTravel.Site #3182
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
name: build | |
on: | |
push: | |
branches: [ main ] | |
paths-ignore: | |
- '**/*.gitattributes' | |
- '**/*.gitignore' | |
- '**/*.md' | |
pull_request: | |
branches: | |
- main | |
- dotnet-vnext | |
- dotnet-nightly | |
workflow_dispatch: | |
env: | |
APPLICATION_URL_DEV: https://londontravel-dev.martincostello.com | |
APPLICATION_URL_PROD: https://londontravel.martincostello.com | |
AZURE_WEBAPP_NAME: londontravelmartincostello | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
DOTNET_GENERATE_ASPNET_CERTIFICATE: false | |
DOTNET_MULTILEVEL_LOOKUP: 0 | |
DOTNET_NOLOGO: true | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | |
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: 1 | |
FORCE_COLOR: 1 | |
NUGET_XMLDOC_MODE: skip | |
PUBLISH_RUNTIME: win-x64 | |
TERM: xterm | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: macos-latest | |
codecov_os: macos | |
- os: ubuntu-latest | |
codecov_os: linux | |
- os: windows-latest | |
codecov_os: windows | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0 | |
- name: Setup Node | |
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 | |
with: | |
node-version: '20' | |
- name: Get npm cache directory | |
id: npm-cache-dir | |
shell: pwsh | |
run: echo "dir=$(npm config get cache)" >> ${env:GITHUB_OUTPUT} | |
- name: Setup npm cache | |
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 | |
id: npm-cache | |
with: | |
path: ${{ steps.npm-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: ${{ runner.os }}-node- | |
- name: Setup NuGet cache | |
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.props') }} | |
restore-keys: ${{ runner.os }}-nuget- | |
- name: Setup Playwright cache | |
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 | |
with: | |
key: ${{ runner.os }}-playwright-${{ hashFiles('Directory.Packages.props') }} | |
path: | | |
~/AppData/Local/ms-playwright | |
~/.cache/ms-playwright | |
~/Library/Caches/ms-playwright | |
- name: Build, test and publish | |
shell: pwsh | |
run: ./build.ps1 -Runtime "${env:PUBLISH_RUNTIME}" | |
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 | |
name: Upload coverage to Codecov | |
with: | |
file: ./artifacts/coverage/coverage.cobertura.xml | |
flags: ${{ matrix.codecov_os }} | |
- name: Publish artifacts | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | |
if: runner.os == 'Windows' && success() | |
with: | |
name: webapp | |
path: ./artifacts/publish/LondonTravel.Site/release_${{ env.PUBLISH_RUNTIME }} | |
if-no-files-found: error | |
- name: Publish screenshots | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | |
if: ${{ !cancelled() }} | |
with: | |
name: screenshots | |
path: ./artifacts/screenshots/* | |
if-no-files-found: ignore | |
- name: Publish traces | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | |
if: ${{ !cancelled() }} | |
with: | |
name: traces | |
path: ./artifacts/traces/* | |
if-no-files-found: ignore | |
- name: Publish videos | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | |
if: ${{ !cancelled() }} | |
with: | |
name: videos | |
path: ./artifacts/videos/* | |
if-no-files-found: ignore | |
deploy-dev: | |
if: github.event.repository.fork == false && github.ref_name == github.event.repository.default_branch | |
name: dev | |
needs: build | |
runs-on: windows-latest | |
concurrency: development_environment | |
environment: | |
name: dev | |
url: ${{ env.APPLICATION_URL_DEV }} | |
permissions: | |
id-token: write | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: webapp | |
- name: Azure log in | |
uses: azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.7 | |
with: | |
client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
- name: Deploy to Azure App Service | |
uses: azure/webapps-deploy@145a0687697df1d8a28909569f6e5d86213041f9 # v3.0.0 | |
with: | |
app-name: ${{ env.AZURE_WEBAPP_NAME }} | |
slot-name: dev | |
test-dev: | |
name: test-dev | |
needs: deploy-dev | |
runs-on: ubuntu-latest | |
concurrency: development_environment | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0 | |
- name: Setup NuGet cache | |
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.props') }} | |
restore-keys: ${{ runner.os }}-nuget- | |
- name: Setup Playwright cache | |
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 | |
with: | |
key: ${{ runner.os }}-playwright-${{ hashFiles('Directory.Packages.props') }} | |
path: | | |
~/AppData/Local/ms-playwright | |
~/.cache/ms-playwright | |
~/Library/Caches/ms-playwright | |
- name: Run end-to-end tests | |
shell: pwsh | |
run: dotnet test ./tests/LondonTravel.Site.Tests --configuration Release --filter Category=EndToEnd --logger "GitHubActions;report-warnings=false" | |
env: | |
WEBSITE_URL: ${{ env.APPLICATION_URL_DEV }} | |
WEBSITE_USER_GOOGLE_USERNAME: ${{ secrets.WEBSITE_USER_GOOGLE_USERNAME }} | |
WEBSITE_USER_GOOGLE_PASSWORD: ${{ secrets.WEBSITE_USER_GOOGLE_PASSWORD }} | |
WEBSITE_USER_MICROSOFT_USERNAME: ${{ secrets.WEBSITE_USER_MICROSOFT_USERNAME }} | |
WEBSITE_USER_MICROSOFT_PASSWORD: ${{ secrets.WEBSITE_USER_MICROSOFT_PASSWORD }} | |
WEBSITE_USER_TWITTER_USERNAME: ${{ secrets.WEBSITE_USER_TWITTER_USERNAME }} | |
WEBSITE_USER_TWITTER_PASSWORD: ${{ secrets.WEBSITE_USER_TWITTER_PASSWORD }} | |
- name: Publish screenshots | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | |
if: ${{ !cancelled() }} | |
with: | |
name: screenshots | |
path: ./artifacts/screenshots/* | |
if-no-files-found: ignore | |
- name: Publish traces | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | |
if: ${{ !cancelled() }} | |
with: | |
name: traces | |
path: ./artifacts/traces/* | |
if-no-files-found: ignore | |
- name: Publish videos | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | |
if: ${{ !cancelled() }} | |
with: | |
name: videos | |
path: ./artifacts/videos/* | |
if-no-files-found: ignore | |
deploy-prod: | |
name: production | |
needs: test-dev | |
runs-on: windows-latest | |
concurrency: production_environment | |
environment: | |
name: production | |
url: ${{ env.APPLICATION_URL_PROD }} | |
permissions: | |
id-token: write | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: webapp | |
- name: Azure log in | |
uses: azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.7 | |
with: | |
client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
- name: Deploy to Azure App Service | |
uses: azure/webapps-deploy@145a0687697df1d8a28909569f6e5d86213041f9 # v3.0.0 | |
with: | |
app-name: ${{ env.AZURE_WEBAPP_NAME }} | |
test-prod: | |
name: test-prod | |
needs: deploy-prod | |
runs-on: ubuntu-latest | |
concurrency: production_environment | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0 | |
- name: Setup NuGet cache | |
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.props') }} | |
restore-keys: ${{ runner.os }}-nuget- | |
- name: Setup Playwright cache | |
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 | |
with: | |
key: ${{ runner.os }}-playwright-${{ hashFiles('Directory.Packages.props') }} | |
path: | | |
~/AppData/Local/ms-playwright | |
~/.cache/ms-playwright | |
~/Library/Caches/ms-playwright | |
- name: Run end-to-end tests | |
shell: pwsh | |
run: dotnet test ./tests/LondonTravel.Site.Tests --configuration Release --filter Category=EndToEnd --logger "GitHubActions;report-warnings=false" | |
env: | |
WEBSITE_URL: ${{ env.APPLICATION_URL_PROD }} | |
WEBSITE_USER_GOOGLE_USERNAME: ${{ secrets.WEBSITE_USER_GOOGLE_USERNAME }} | |
WEBSITE_USER_GOOGLE_PASSWORD: ${{ secrets.WEBSITE_USER_GOOGLE_PASSWORD }} | |
WEBSITE_USER_MICROSOFT_USERNAME: ${{ secrets.WEBSITE_USER_MICROSOFT_USERNAME }} | |
WEBSITE_USER_MICROSOFT_PASSWORD: ${{ secrets.WEBSITE_USER_MICROSOFT_PASSWORD }} | |
WEBSITE_USER_TWITTER_USERNAME: ${{ secrets.WEBSITE_USER_TWITTER_USERNAME }} | |
WEBSITE_USER_TWITTER_PASSWORD: ${{ secrets.WEBSITE_USER_TWITTER_PASSWORD }} | |
- name: Publish screenshots | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | |
if: ${{ !cancelled() }} | |
with: | |
name: screenshots | |
path: ./artifacts/screenshots/* | |
if-no-files-found: ignore | |
- name: Publish traces | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | |
if: ${{ !cancelled() }} | |
with: | |
name: traces | |
path: ./artifacts/traces/* | |
if-no-files-found: ignore | |
- name: Publish videos | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | |
if: ${{ !cancelled() }} | |
with: | |
name: videos | |
path: ./artifacts/videos/* | |
if-no-files-found: ignore |