Skip to content

Update dotnet.yml

Update dotnet.yml #10

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: build-test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-test:
env:
BUILD_CONFIG: "Release"
Solution_Name: Learn2Blog.sln
#Test_Project_Path: tests/Learn2BlogTest.csproj
runs-on: windows-latest
permissions:
contents: read
packages: write
steps:
# checkout code
- name: "Checkout"
uses: actions/checkout@v2
with:
fetch-depth: 0
# install dotnet
- name: "Setup .NET"
uses: actions/setup-dotnet@v2
with:
dotnet-version: 7.0.x
# restore dependencies
- name: "Restore dependencies"
run: dotnet restore
# build
- name: "Build"
run: dotnet build --configuration ${{ env.BUILD_CONFIG }}
# test
- name: "Run tests"
run: dotnet test --no-build
working-directory: tests