Skip to content

Build and Format experiment #7

Build and Format experiment

Build and Format experiment #7

Workflow file for this run

name: .NET Core Desktop Build and Test
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
name: Build and Test
runs-on: windows-latest # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
env:
Solution_Name: BudgetAnalyser.sln
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache .NET packages
uses: actions/cache@v3
with:
path: |
~/.nuget/packages
~/.local/share/NuGet/Cache
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --verbosity quiet --configuration Debug
# Execute all unit tests in the solution
- name: Run unit tests
run: dotnet test --no-build --verbosity minimal --configuration Debug
- name: Validate code style
run: dotnet format --no-restore --verify-no-changes --verbosity minimal