Bump sass from 1.77.4 to 1.78.0 in /CommonComponents #40
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 and deploy | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "**.md" | |
pull_request: | |
branches: | |
- main | |
schedule: | |
# Runs every sunday 05.00 PM UTC (22.30 PM IST Equivalent). Pattern - "*(0-59 minute) *(0-23 hour) *(1-31 day of the month) *(1-12 month) *(0-6 day of the week)" | |
- cron: '0 17 * * 0' | |
permissions: | |
contents: write | |
jobs: | |
build-test-deploy-blazor: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the code | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Install .NET SDK | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
# Install dotnet wasm buildtools workload | |
- name: Install .NET WASM Build Tools | |
run: dotnet workload install wasm-tools | |
# Install Node JS | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.11.1' | |
- run: npm install | |
working-directory: ./CommonComponents | |
# Restore Dependencies | |
- name: Restore dependencies | |
run: dotnet restore ./Web/Web.csproj | |
# Check Vulnerable Nuget Packages | |
- name: Checking Vulnerable Nuget Packages | |
run: | | |
dotnet list ./Web/Web.csproj package --vulnerable --include-transitive --format=json > list.json | |
if jq -cre '.projects | .. | .severity? // empty | select(test("Critical|High"))' list.json; then | |
echo 'Vulnerabilities found! Exiting...' | |
jq . list.json | |
exit 1 | |
else | |
echo 'No vulnerabilities found!' | |
fi | |
# Check Outdated Nuget Packages | |
- name: Checking Outdated Nuget Packages | |
run: dotnet list ./Web/Web.csproj package --outdated --include-transitive --format json | |
# Check Deprecated Nuget Packages | |
- name: Checking Deprecated Nuget Packages | |
run: dotnet list ./Web/Web.csproj package --deprecated --include-transitive --format json | |
# Build Blazor Project | |
- name: Build Blazor Project | |
run: dotnet build ./Web/Web.csproj --configuration Release --no-restore | |
# Install dotnet report generator | |
- name: Install .NET Report Generator | |
run: dotnet tool install -g dotnet-reportgenerator-globaltool | |
# Run Tests | |
- name: Run Test | |
run: dotnet test ./UITests/UITests.csproj --configuration Release --verbosity normal --logger trx --collect:"XPlat Code Coverage" | |
# Test Reporter | |
#- name: Test Reporter | |
# uses: dorny/test-reporter@v1.7.0 | |
# if: success() || failure() | |
# with: | |
# name: Unit Test Report | |
# path: '**/*.trx' | |
# reporter: dotnet-trx | |
# Generate Test Report | |
- name: Generate Test Report | |
run: reportgenerator -reports:./**/Coverage.cobertura.xml -targetdir:"./Test/Report" -reporttypes:Html | |
# Upload Test Report | |
- name: Upload Test Result | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ilovedotnet-test-report | |
path: ./Test/Report | |
retention-days: 1 | |
# Use always() to always run this step to publish test results when there are test failures | |
if: ${{ always() }} | |
# Publishes Blazor project to the release-folder | |
- name: Publish Blazor Project | |
run: dotnet publish ./Web/Web.csproj -c:Release -p:GHPages=true --no-restore -o dist/Web --nologo | |
# Commit Blazor Web App to GitHub Pages | |
- name: Commit wwwroot to GitHub Pages | |
if: ${{ github.actor != 'dependabot[bot]' && github.event_name != 'pull_request' }} | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
BRANCH: gh-pages | |
FOLDER: dist/Web/wwwroot | |
build-test-deploy-maui: | |
runs-on: windows-latest | |
steps: | |
# Checkout the code | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Install Node JS | |
- name: Setup Node.js environment | |
run: npm install | |
working-directory: ./CommonComponents | |
# Restore Dependencies | |
- name: Restore dependencies | |
run: dotnet restore |